Commit Graph

3585 Commits

Author SHA1 Message Date
Gregory Nutt
02df81bc5f Squashed commit of the following:
drivers/lcd:  Add an IOcTL to FT80x driver to write to FIFO CMD RAM.
2018-02-20 15:24:52 -06:00
Gregory Nutt
237ff11db7 Squashed commit of the following:
drivers/lcd and include/nuttx/lcd:  Add FT80x support for writing to graphics memory.  Also add some definitions needed by apps/examples/ft80x for bitmap manipulation.
    drivers/lcd:  Review/update FT80x initializatin logic
2018-02-19 13:08:50 -06:00
Sebastien Lorquet
9527f849f4 drivers/lcd: Detect and handle more errors in return values within the LCD framebuffer and SSD1306 drivers 2018-02-19 07:32:44 -06:00
Gregory Nutt
3d27adc7d1 include/nuttx/lcd: Add some FT80x definitions and modify some structures in order to support apps/examples/ft80x. 2018-02-18 16:49:12 -06:00
Gregory Nutt
2baa155791 drivers/lcd: In order to actually use the new register access IOCTL calls, need to move the register address definitions out of the private header file and into the public header file. 2018-02-18 13:45:20 -06:00
Gregory Nutt
65513d58e3 drivers/lcd: Add FT80x IOCTL commands to access individual registers. 2018-02-18 12:39:15 -06:00
Gregory Nutt
be73c65b64 drivers/lcd: Minor updates to FT80x initialization. 2018-02-18 11:04:29 -06:00
Gregory Nutt
eb3663721e Squashed commit of the following:
drivers/lcd:  Rename ft80x_base.c to just ft80x.c.  Add logic to notify FT80X clients of events via signals.
    drivers/lcd:  Trivial updates to naming.  Add some new definitions.
2018-02-17 18:30:24 -06:00
Gregory Nutt
758e94f7a7 drivers/lcd: Add FT80x interrupt framework. Interrupts are still not used by the driver. 2018-02-17 16:36:11 -06:00
Gregory Nutt
885ab75045 drivers/lcd: Add support for creating display lists incrementally. 2018-02-17 14:48:18 -06:00
Gregory Nutt
e4292dced8 drivers/lcd: Add unlink support to the FT80x driver. 2018-02-17 13:01:06 -06:00
Gregory Nutt
6a405ead67 This commit adds a barbones FTDI FT80x driver. It is untested (I don't even have hardware yet and, hence, it is marked as EXPERIMENTAL
Squashed commit of the following:

    drivers/lcd:  Finishes off basic FT80X.  Still missing some niceties.
    drivers/lcd: Rethink FT80X display list interface.
    drivers/lcd:  More FT800x display list logic.  Still not complete.
    drivers/lcd:  Add some basic FT80x initialization logic.
    drivers/lcd:  Add ft80x display list IOCTL framework.  Still missing low level display list operations.
    drivers/lcd:  FT80x driver cannot be a standard LCD driver but must, instead, be a custom character driver.
    drivers/lcd:  Add FT800 co-processor commands and display list helpers.
    drivers/lcd:  Add SPI interface and framework for the initialization and the basic LCD driver.
    drivers/lcd:  Add beginnings of some FT80x implementation.
    drivers/lcd:  Add definitions for the FTDI FT801 part
    include/nuttx/lcd/ft800.h:  Add initial FT800 interface definition.
    drivers/lcd:  Add ft800 header file.
2018-02-17 11:59:07 -06:00
Sebastien Lorquet
d040316143 include/lcd: Eliminate a warning from an SSD1306 header file by adding a forward reference to struct i2c_master_s. 2018-02-15 13:54:57 -06:00
Matt Thompson
75f68b9d3a Merged in extent3d/nuttx/lis3dh-fix (pull request #600)
LIS3DH: Fix missing shift when writing output data rate to register

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-14 20:27:48 +00:00
Sebastien Lorquet
abd3c4a7ea drivers/eeprobom: EEPROM driver for AT24xx compatible EEPROMs. 2018-02-14 07:53:01 -06:00
Gregory Nutt
e07f12954c Trivial changes from review of last PR. 2018-02-13 13:08:38 -06:00
Matt Thompson
e79e2e2d97 Merged in extent3d/nuttx/lis3dh (pull request #598)
Added support for LIS3DH accelerometer sensor.

* Added support for LIS3DH accelerometer sensor.

* Fix line length

* Fix more line lengthts

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-13 19:00:29 +00:00
Gregory Nutt
37c9b3d54a sched/sched: Implements a global scheduler lock capability as part of SMP support. This allows the scheduler to be locked with no knowledge or access to the TCB of the currently running task. This is necessary because accessing the TCB of the currenlty running task is, itself, a non-atomic operation. This global scheduler lock cpability was add just to support that atomic access to the TCB. 2018-02-05 13:12:36 -06:00
Gregory Nutt
5beab6fbf0 spin_lock_irqsave() and spin_unlock_irqrestore() are only valid if the CPU supports global disabling of interrupts. 2018-02-04 15:41:22 -06:00
Gregory Nutt
1e59d9dd14 armv7-a, armv7-r, armv7-m: Add atomic read-add-write and read-subtract-write functions. 2018-02-04 12:22:03 -06:00
Gregory Nutt
2683f713ab Make sure that labeling is used consistently in all function headers (part 3). 2018-02-01 12:17:03 -06:00
Gregory Nutt
1567b82429 Make sure that labeling is used consistently in all function headers (part 2). 2018-02-01 12:03:55 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Stewart
be81893b55 arm/src/kinetis: Correct some Ethernet PHY register bit tests for the KSZ8081 PHY. 2018-02-01 07:24:36 -06:00
Gregory Nutt
50ca32e254 Squashed commit of the following:
sched/:  Convert legitimate uses of task_create() to nxtask_create().  Review handling of returned values from all uses of kthread_create() (as well as nxtask_create()).
    graphics/:  Review return values for all calls to kthread_start() because it no longer returns an errno.
    drivers/:  threads started by drivers should be kernel threads, not user tasks.  Review return values for all calls to kthread_start() because it no longer returns an errno.
    configs/:  threads started by board bringup logic should be kernel threads, not user tasksi (part 2 of 2).
    sched/task:  Add nxtask_create().  Kthread_create() and nxtask_create() are internal OS functions and should not modify the errno variable.  configs/:  threads started by board bringup logic should be kernel threads, not user tasks.
2018-01-31 16:11:54 -06:00
Gregory Nutt
da50646bcf sched/wdog: wd_start() is an internal OS function and should not set the errno value. Reviewed and updated every call to wd_start() to verify if return value is used and if so if the errno value is accessed. 2018-01-31 10:09:14 -06:00
Masayuki Ishikawa
d295f11a3a SMP: Introduce a new global IRQ clearing logic and tasklist protection.
The previous implementation of clearing global IRQ in sched_addreadytorun()
and sched_removereadytorun() was done too early. As a result, nxsem_post()
would have a chance to enter the critical section even nxsem_wait() is
still not in blocked state. This patch moves clearing global IRQ controls
from sched_addreadytorun() and sched_removereadytorun() to sched_resumescheduler()
to ensure that nxsem_post() can enter the critical section correctly.

For this change, sched_resumescheduler.c is always necessary for SMP configuration.
In addition, by this change, task_exit() had to be modified so that it calls
sched_resumescheduler() because it calls sched_removescheduler() inside the
function, otherwise it will cause a deadlock.

However, I encountered another DEBUGASSERT() in sched_cpu_select() during
HTTP streaming aging test on lc823450-xgevk. Actually sched_cpu_select()
accesses the g_assignedtasks which might be changed by another CPU. Similarly,
other tasklists might be modified simultaneously if both CPUs are executing
scheduling logic. To avoid this, I introduced tasklist protetion APIs.

With these changes, SMP kernel stability has been much improved.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-31 15:35:36 +09:00
Gregory Nutt
82982f7972 sched/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23). Add new nxsched_setscheduler() and nxsched_getaffinity() which are equivalent to their counterparts without the nx on front. These versions do not modify the errno value. Changed all calls within the OS to use these newer versions of the functions. 2018-01-30 16:16:41 -06:00
Gregory Nutt
170a50c690 Squashed commit of the following:
sched/sched:  Correct some build issues introduced by last set of changes.
    sched/sched:  Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value.  All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
    sched/sched:  Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value.  Also renamed to nxsched_reprioritize() and sched_setpriority().
    sched/sched:  Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value.  All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
    sched/sched:  Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value.  All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
    sched/sched:  Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues).  All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
2018-01-30 11:08:18 -06:00
Juha Niskanen
dafa72edc3 drivers/sensors: add support to MAX44009 ambient light sensor 2018-01-29 07:56:06 -06:00
Gregory Nutt
fef255e5be This commit adds an as-of-yet untested implemented of UDP write buffering.
Squashed commit of the following:

    net/udp:  Address most of the issues with UDP write buffering.  There is a remaining issue with handling one network going down in a multi-network environment.  None of this has been test but it is certainly ready for test.  Hence, the feature is marked EXPERIMENTAL.
    net/udp:  Some baby steps toward a corrected write buffering design.
    net/udp:  Remove pesky write buffer macros.
    Eliminate trailing space at the end of lines.
    net/udp:  A little more UDP write buffering logic.  Still at least on big gaping hole in the design.
    net/udp:  Undefined CONFIG_NET_SENDTO_TIMEOUT.
    net/udp:  Crude, naive port of the TCP write buffering logic into UDP.  This commit is certainly non-functional and is simply a starting point for the implementatin of UDP write buffering.
    net/udp:  Rename udp/udp_psock_sendto.c udp/udp_psock_sendto_unbuffered.c.
2018-01-22 18:32:02 -06:00
Gregory Nutt
9417bfde0e include/termios.h: Update comments; fix long lines. 2018-01-18 12:51:07 -06:00
Gregory Nutt
301bf1ee77 This commit eliminates the BOARDIOC_TSCTEST_SETUP command.
Squashed commit of the following:

    configs:  Each board now initializes the touchscreen controller as a normal part of its board bring-up.  board_tsc_setup() is gone; the touchscreen controller is now treated like any other on-board device.
    Remove all support for BOARDIOC_TSCTEST_SETUP
    Move prototype for board_tsc_setup() from include/nuttx/board.h to individual board header files.
2018-01-17 09:33:28 -06:00
Masayuki Ishikawa
ab3fa89023 SMP: Introduce spin_lock_wo_note() and spin_unlock_wo_note()
These APIs are used in sched_note.c to protect instumentation data.
The deffrence between these APIs to exsiting spin_lock() and spin_unlock()
is that they do not perform insturumentation to avoid recursive call
when SCHED_INSTRUMENTATION_SPINLOCKS=y.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-17 13:29:42 +09:00
Gregory Nutt
e276d4d16d Remove the BOARDIOC_TSCTEST_TEARNDOWN boardctl() command. Remove all implementations of board_tsc_teardown() (the were all stubs anyway except for the simulation). 2018-01-16 18:03:21 -06:00
Gregory Nutt
8f94ce46f9 arch/arm/src/lpc54xx: The basic SPI driver is code complete but still untested. This driver is 'basic' in that in only supports polled mode operations. 2018-01-14 12:09:26 -06:00
Gregory Nutt
0080225473 sched/irq: Add a configuration option to show interrupt information via a procfs file. 2018-01-12 18:26:46 -06:00
Gregory Nutt
eef1276565 configs/stm32f103-minimum: Remove nonsensical #error. 2018-01-09 11:17:01 -06:00
Gregory Nutt
e4652bd3dc Squashed commit of the following:
fs: Add truncate() support for userfs
    fs/unionfs:  Add truncate() support to the unionfs
    fs/tmpfs:  Add ftruncate() support to tmpfs
    syscall/: Add system call support for ftruncate()
    net/route:  Adding ftruncate() support eliminates an issue in file-based routing table management.
    fs:  Add basic framework to support truncate() and ftruncate().  The infrastructure is complete.  Now, however, the actual implementation of ftruncate() will have to be done for each file system.
2018-01-03 16:03:56 -06:00
Gregory Nutt
b2adb4917f arch/arm/src/lpc54xx: Add register level debug output for Ethernet testing. Fixed a few start up problems. Still hangs on start-up, however. 2017-12-31 11:11:57 -06:00
Gregory Nutt
2de08627e0 arch/arm/src/lpc54xx: Finishes open design issues with AVBTP multi-channel operation. 2017-12-30 19:05:39 -06:00
Gregory Nutt
13b5d4de96 arch/arm/src/lpc54xx: Resolves some design issues with multicast address filtering and also with AVBTP multi-channel operation (the latter design is still incomplete). 2017-12-30 17:19:37 -06:00
Gregory Nutt
cb9e1e7716 arch/arm/src/lpc54xx: Add some Ethernet PHY initialization logic. 2017-12-27 12:01:24 -06:00
Gregory Nutt
7e7bdd181f Cosmetic fixes to comments, README, and other trivial corrections. 2017-12-25 10:45:47 -06:00
Gregory Nutt
b26c70b11f arch/arm/src/lkpc54xx: In SDMMC driver, fix an error which was clobbering the interrupt mask register (xfrmask). Also, add a kludge for the missing DTO interrupt. 2017-12-20 18:39:10 -06:00
Anthony Merlino
058a938268 Merged in antmerlino/nuttx/logupto-fix (pull request #559)
syslog: Fixes LOG_UPTO macro to include specified log level

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-12-20 13:34:29 +00:00
Gregory Nutt
23dfc0bf06 drivers/ft5x06: Add a polled mode of operation for the FT5x06 in attempt to work around the fact that the LPCXpresso-LPC54628 chose a non-interrupt pin for the FT5x06 interrupt. Driver is still not yet functional. 2017-12-18 08:58:07 -06:00
Juha Niskanen
db079608d9 drivers/power/bq2429x.c: Add trickle charging mode 2017-12-18 06:38:41 -06:00
Gregory Nutt
c014400895 drivers/input/ft5x06: Fix a misconception.. WAKE is an output, not an input. 2017-12-18 06:36:44 -06:00
Juha Niskanen
b4875e2286 Merged in juniskane/nuttx-1/juniskane/battery_gaugeh-edited-online-with-bitbuc-1513594794596 (pull request #558)
battery_gauge.h edited online with Bitbucket

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-12-18 12:10:02 +00:00