Commit Graph

4059 Commits

Author SHA1 Message Date
Gregory Nutt
ae8e0359b9 include/nuttx/nx/nxglib.h: Eliminate some warnings. 2019-03-15 15:52:31 -06:00
Gregory Nutt
9a97eb0fcf This commit brings the per-framebuffer logic to code-complete. Still untested.
Squashed commit of the following:

    Update TODO list

    graphics/nxbe:  The moverectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The filltrapezond renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The getrectangle method now returns data from the per-window framebuffer if available.

    graphics/nxbe:  The fillrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxmu:  If a window supports a per-window framebuffer, then redraw callbacks are suppressed and the device content is updated from the shadow, per-window framebuffer.  graphics/nxbe:  The copyrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe/nxbe_setsize.c:  Reallocate the per-window framebuffer when the window size changes.
2019-03-15 12:15:33 -06:00
Gregory Nutt
f2d90e6298 graphics: For consistency, rename fields fb->fbmem as in other structures. 2019-03-14 12:19:01 -06:00
Gregory Nutt
419c4cb6be A little more progress toward the implementation of per-window framebuffers. Still missing:
- Logic that generates the low lever framebuffer renderers for the per-window framebuffers,
- The logic that picks off the per-window framebuffer updates from normal graphics device updates.  This logic must update both the per-window framebuffer and the graphics device (from the framebuffer).

Squashed commit of the following:

    graphics:  Add logic to allocate the per-window framebuffer.

    graphics:  A few fragmentary thoughts on how a per-window framebuffer could be represented and allocated.
2019-03-14 11:20:14 -06:00
Gregory Nutt
8a46b1f488 Squashed commit of the following:
graphics:  nx_openwindow() and nxtk_openwindow() now accept an addtional 'flag' parameter.  This argument is not used at present but will, eventually enable a RAM backed, per-window framebuffer.

    graphics/Kconfig:  Add configuration to support a rambacked framebuffer. Current marked as EXPERIMENTAL because this is a work in progress.
2019-03-13 12:34:13 -06:00
Gregory Nutt
0454ae2a10 This commit removes naming associated with and naming for the now non-existent NXFE graphics layer.
Squashed commit of the following:

    graphics/:  Rename nxfe_reportposition to nxmu_reportposition.  The is no longer an nxfe layer.

    graphics/:  Renmae nxfe_redrawreq to nxmu_redrawreq.  The is no longer an nxfe layer.

    graphics/nxmu/nxmu.h:  Renmae nxfe.h to nxmu.h.  There is no long an nxfe layer.

    graphics/: Rename nxfe_state_s to nxmu_state_s.  There is no longer an nxfe layer.

    graphics/: Rename nxfe_conn_s to nxmu_conn_s.  There is no longer an nxfe layer.
2019-03-13 09:16:30 -06:00
Gregory Nutt
e780ee3a08 include/nuttx/nx/nxmu.h: Remove prototype of non-existent function. 2019-03-13 08:23:02 -06:00
Gregory Nutt
aa4f7c9ba7 graphics/nxmu/nxmu_start.c: Extend nxmu_start so that receives a display number as an argument. This makes it possible to have multiple instances of the NX server running on boards that support multiple displays. Also includes updates to boardctl() to accept display number paramters. 2019-03-10 13:50:05 -06:00
Gregory Nutt
bd6b05f5bb Update TODO and some comments. 2019-03-10 07:25:45 -06:00
Gregory Nutt
ffca6badfc Squashed commit of the following:
graphics/nxterm:  Needs to clear display initially.  Otherwise, garbage from previous display may still be present from preceding NxWM window.

    graphics/nxterm:  Back out most of the preceding NxTerm changes related to window size.  apps/examples/nxterm passed the complete NxTK window size.  Those changes were needed to make aps/examples/nxterm work.  But NxWM passes the the size of the NxTK main sub-window.  So I needed to back out the changes and then change the applications so that they passed the same value (the size of the NxTK sub-window).
2019-03-09 13:13:05 -06:00
Bill Gatliff
a8744defe2 drivers/sensors/mpu60x0.c: Initial support for TDK InvenSense MPU6000 and MPU6050 6-axis gyroscope and accelerometers. This commit supports SPI media only. 2019-03-07 16:50:37 -06:00
Gregory Nutt
aca114d895 configs/boardctl.c: Add boardctl() commands to replace direct calls to nxterm_redraw() and nxterm_kbdin(). 2019-03-06 15:21:29 -06:00
Gregory Nutt
56b5b9f7ad graphics/nxterm: Remove the nxterm_unregister interface. The correct way to unregister a device is to unlink it. 2019-03-06 10:16:47 -06:00
Gregory Nutt
ddf7f32158 configs/boardctl.c and include/sys/boardctl.h: Add support for BOARDIOC_NXTERM which can be used to create an NxTerm terminal. 2019-03-06 09:17:19 -06:00
Gregory Nutt
5fe6981c9a Squashed commit of the following:
libs/libc/pthread/pthread_spinlock.c:  Resolve several TODO issues by accessing up_testset() via the boardctl() interface rather than attempting to call it directly.

    configs/boardctl.c, include/sys/boardctl.h:  Add access to architecture-specific up_testset() via boardctl().

    arch/Kconfig's, sched/Kconfig, and include/nuttx/spinlock.h:  Spinlocks are not available unless the architecture supports the up_testset() operation.
2019-03-04 14:22:50 -06:00
Gregory Nutt
b2f110e0b0 include/pthread.h and libs/libc/pthread/pthread_spinlock.c: Add a very preliminary implementation of the new POSIX pthread_spinlock_* interfaces. This feature is marked EXPERIMENTAL. There are usage model issues to be examined and there are also architectural issues that currently limit the implemantion to the FLAT build (that is, however, fixable when the APIs are needed. 2019-02-28 10:21:05 -06:00
Gregory Nutt
ef49b5e1b5 include/nuttx/net/netdev.h: Update some comments. 2019-02-25 19:20:29 -06:00
Gregory Nutt
0951151c33 libs/libc/pthread, syscall/, and include/sys/syscall.h: Support for pthread_mutex_timedlock() was added recently, however no new system call was added for the API make is usable only in the FLAT build. With a pthread_mutex_timedlock() system call, there is no reason for a pthread_mutex_lock() system call since it is now nothing more than an wrapper around pthread_mutex_timedlock(), passing NULL for the time value. The pthread_mutex_lock() syscall was removed and the pthread_mutex_lock() implemented was moved from /sched/pthread to where it now belows in libs/libc/pthread. 2019-02-25 18:19:13 -06:00
Gregory Nutt
c7cc6bab96 included/pthreads, sched/pthreads, and Documetions: Updates after review of last PR. 2019-02-24 14:40:11 -06:00
Leif Jakob
58e387fc6f Merged in leif_jakob/nuttx/pthread_mutex_timedlock (pull request #830)
support for pthread_mutex_timedlock

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-24 20:04:24 +00:00
raiden00pl
0523e8a1d0 Merged in raiden00/nuttx_lora (pull request #829)
SX127X improvements

drivers/wireless/lpwan/sx127x/sx127x: add TX power configuration

drivers/wireless/lpwan/sx127x/sx127x: discard RX packets with unsupported length

drivers/wireless/lpwan/sx127x/sx127x: refactor some logic

drivers/wireless/lpwan/Kconfig: move some hardcoded sx127x configuration to Kconfig

drivers/wireless/lpwan/Kconfig: remove EXPERIMENTAL flag

configs/b-l072z-lrwan1/sx127x: board-specific sx127x configuration

configs/nucleo-f091rc/sx127x: board-specific sx127x configuration

configs/nucleo-l073rz/sx127x: board-specific sx127x configuration

LORA and FSK look fine but there is something missing for OOK and communication is not working yet.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-24 17:58:46 +00:00
Gregory Nutt
a5183e3460 include/poll.h and include/nuttx/compiler.h: Update some comments; improved a conditional test. 2019-02-21 18:06:53 -06:00
Gregory Nutt
94fe5c8349 include/poll.h: Remove un-named union from 'struct pollfd'. It is not required by OpenGroup.org and violates the NuttX C coding standard because it is not C89 compatible. 2019-02-21 17:40:30 -06:00
Gregory Nutt
40889daf97 libs/libc/stdio/lib_libvsprintf.c and include/limits.h: Some minor corrections. 2019-02-21 14:52:44 -06:00
Johannes
0059a5a88e libs/libc/stdio/lib_vsprintf.c and Kconfig:
- Numbered arguments now work by using two pass parsing and an argument list.
    The maximum number of numbered args is determined by CONFIG_LIBC_NL_ARGMAX
    which is then copied into NL_ARGMAX.
  - Size of pointer argument ('p') is determined before output.

include/limits.h:  Define NL_ARGMAX (as well as some of the other 'invariant
  values' per http://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html)
2019-02-21 13:26:33 -06:00
Anthony Merlino
840dab8c47 Merged in antmerlino/nuttx/elf-cplusplus-guard (pull request #826)
include/nuttx/elf.h: Adds missing extern "C" __cplusplus guard.

Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-19 15:24:25 +00:00
Gregory Nutt
e982488e6c include/nuttx/compiler.h: Important fix for C++ users. compiler.h was using the value of __STDC_VERSION__ to determine if inline functions are supported or not. If not then the keyword inline was defined out. Good for C but bad for C++ because C++ does not defined __STDC_VERSION__ at all. C++ applications may draw in compiler.h indirectly via other head files and this can result in C++ compiler problems since 'inline' is defined out. This fix is to ignore the (undefined) __STDC_VERSION__ if __cplusplus is defined. 2019-02-19 09:04:04 -06:00
Gregory Nutt
2fbec4cdf6 Doumentation/NuttxPortingGuide.html: Add description of board_early_initialize() and board_late_initialize(). 2019-02-18 17:36:11 -06:00
Gregory Nutt
32a300806e Let's rename board_driver_initialize() to board_early_initialize() to emphasize its relationship to board_late_initialize(). 2019-02-18 16:25:08 -06:00
Gregory Nutt
a76e137ce2 Squashed commit of the following:
sched/init/nx_start.c:  Add support for CONFIG_BOARD_DRIVER_INITIALIZE.  If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().

    Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.

    Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Gregory Nutt
653ff2c34e Restore lib_sprintf(). It was removed because I thought was not used. But I was wrong; there is logic in drivers/syslog that depends on lib_sprintf().
This commits reverts a part of commit c271151d57.  That commit also removed lib_sscanf() which really is not needed.
2019-02-16 12:29:00 -06:00
Michał Łyszczek
626afb015b nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html 2019-02-15 19:18:55 -06:00
Gregory Nutt
72bc331217 Cosmetic update to some comments. 2019-02-15 18:26:06 -06:00
Gregory Nutt
c271151d57 libs/libc/stdio: Remove unused, non-standard functions lib_sscanf() and lib_sprintf(). 2019-02-15 18:01:39 -06:00
Gregory Nutt
928108036c libs/libc/stdio: In the recent changes we lost the implementation of vsscanf(). This commit restores vsscanf(). sscanf() is not just a front end for vsscanf(). 2019-02-15 17:31:58 -06:00
Johannes
350295d009 Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

    TODO:  Remove 'Missing fscanf()' bug
    Clean up remaining complaints for tools/nxstyle
    Apply tools/detab, rmcr, convert-comments, lowhex, and indent.sh to the new and highly modified files.

Author: Johannes <nivus.entwicklung@gmail.com>

    - Move vscanf logic to lib_sscanf.c  Switched to stream interface (tricky, because the old implementation used massive read ahead, which isn't suitable for streams, chars already read are gone).
    - Added scanf and fscanf
    - Added hh, h, and ll modifiers
    - Fixes for standard compliance in scanf
    - Fixes for standard compliance in strto... function family (don't consume single '-' or '+', allow sign in strotul(l))
2019-02-14 07:03:02 -06:00
Gregory Nutt
efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -06:00
Gregory Nutt
a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt
810b5de41b Update TODO list. 2019-02-10 07:49:25 -06:00
Gregory Nutt
3ba777bb27 include/: Correct naming of standard header file. Should be dlfcn.h, not dllfcn.h. I am surprised no one ever noticed before now. 2019-02-09 14:09:28 -06:00
Gregory Nutt
d05e2da2ce include/nuttx/nx/nxmu.h: This header file coul be lethal; it declared an #error if CONFIG_DISABLE_MQUEUE=y. 2019-02-04 18:45:09 -06:00
Gregory Nutt
193e9af6f6 include/nuttx/nxmu.h: Due the name change, the nxmu_start() belongs more appropriately in nxmu.h than nx.h. 2019-02-04 17:48:30 -06:00
Gregory Nutt
7a2bb1f727 graphics/nxmu/nxmu_start.c: Fix a naming collision introduced with the last commit. Ye olde nx_start that started the NX graphics is now nxmu_start(). 2019-02-04 16:51:48 -06:00
Gregory Nutt
a2e62f557d Squashed commit of the following:
sched/init/nx_bringup.c:  Fix a naming collision.
    sched/init:  Rename os_start() to nx_start()
    sched/init:  Rename os_smp* to nx_smp*
    sched/init:  Rename os_bringup to nx_bringup
    sched/init:  rename all internal static functions to begin with nx_ vs os_
2019-02-04 16:20:35 -06:00
Gregory Nutt
bb623d1e04 This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:

    Trivial, cosmetic
    sched/, arch/, and include:  Rename task_vforkstart() as nxtask_vforkstart()
    sched/, arch/, and include:  Rename task_vforkabort() as nxtask_vforkabort()
    sched/, arch/, and include:  Rename task_vforksetup() as nxtask_vfork_setup()
    sched/:  Rename notify_cancellation() as nxnotify_cancellation()
    sched/:  Rename task_recover() to nxtask_recover()
    sched/task, sched/pthread/, Documentation/:  Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
    sched/task:  Rename task_schedsetup() to nxtask_schedsetup()
    sched/ (plus some binfmt/, include/, and arch/):  Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
    arch/ and sched/:  Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
    sched/task:  Rename all internal, static, functions to begin with the nx prefix.
2019-02-04 13:42:51 -06:00
Gregory Nutt
641a98a434 arch/: The saved return register state is available on the user stack. Thic commit reorders some logic so that certain, critical registers are preserved in the TCB. This does not make the logic 100% secure, but does prevent some obvious things. sched/signal/sig_delivery: Add a flag to the TCB to indicate that we are in a signal handler. Use this flag to assure that a there a never attempts to nest signal handling operations on a thread. This was guaranteed before but when locking of pre-emption during signal delivering was eliminated in a previous commit, there was a remote possibility of an attempt to do nested signal handling. This flag assures that there is only one signal handled at a time. 2019-02-03 15:29:47 -06:00
Gregory Nutt
6408857f6d sched/sched/sched_processtimer.c: Add a configurable call out to a user-provided function, 'timer hook', on each timer interrupt. 2019-01-30 07:22:44 -06:00
Xiang Xiao
2f49cdb311 include/nuttx/list.h: Fix some typos. 2019-01-29 07:37:22 -06:00
Gregory Nutt
5a0f514615 drivers/timers/timer.c: Support the signal notification through SIGEV_THREAD 2019-01-28 06:32:27 -06:00
Gregory Nutt
732bef73a7 include/net/if.h: Fix some macro definitions overlooked in commit d105dc9b5e. Also corrects the name of a structure: mii_ioctl_notify_s vs mii_iotcl_notify_s. 2019-01-27 16:43:42 -06:00