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>
configs/flipnclick-pic32mz: Add an nxlines configuration for use in testing the custom HiletGo Click board.
arch/mips/src/pic32mz: Correct some SPI-related typos. configs/flipnclick-pic32mz: Finishes integration of HiletGo OLED. drivers/lcd: Finish support for HiletGo OLED.
drivers/lcd: Add configuration support for HiletGo OLED. configs/flipnclick-pic32mz: Add board support for HiletGo OLED.
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.
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/: OS references to the errno variable should always use the set_errno(), get_errno() macros
arch/arm/src/stm32 and stm32f7: Architecture-specific code is not permitted to modify the errno variable. drivers/ and libc/: OS references to the errno variable should always use the set_errno(), get_errno() macros
lc823450 smp improvement
* arch/arm/src/common: Apply irq_spin APIs to modifyregXX
Replace enter_critical_section with spin_lock_irqsave.
Replace leave_critical_section with spin_unlock_irqrestore.
Please see 6150299f54 as well.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch/arm/src/lc823450: Do not use modifyreg32() to enable Mutex.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch/arm/src/lc823450: Modify IRQ control for i2s
Interrupt will be handled on CPU0 with this change.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch/arm/src/lc823450: Apply irq_spin APIs to dma/syscontrol/usbdev.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* configs/lc823450-xgevk: Assign CPU1 to lpwork
This change will improve load balancing for networking with RNDIS.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* drivers/audio/wm8776.c: Improve stability in SMP mode
Apply irq_spin APIs to improbe performance.
Repeat to process a message to avoid deadlock.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* configs/lc823450-xgevk: Enable SPINLOCK_IRQ and NXPLAYER in rndis
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Squashed commit of the following:
arch/arm/src/lpc54xx: Finish off some missing logic. Complete now execpt for GPIO and LED support.
arch/arm/src/lpc54xx: Add lpc54_clrpend.c
arch/arm/src/lpc54xx: Serial driver is complete and compiles.
arch/arm/src/lpc54xx: Add beginning of a serial driver (still missing some logic)
arch/arm/src/lpc54xx: Fleshes out low level USART intialization.
arch/arm/src/lpc546xx/Kconfig: Add hooks to integrate with common seril upper half.
arch/arm/src/lpc54xx: Beginning of USART console support.
arch/arm/src/lpc54xx: Completes very basic clock configuration.
arch/arm/src/lpc54xx: Add clocking logic (still not complete)
arch/arm/src/lpc54xx: Beginning of PLL configuration logic.
arch/arm/src/lpc54xx: Fix a few things from first compile attempt. Compilation cannot work until I at least finish the clock configuration logic.
arch/arm/src/lpc54xx: Addes some SysTick logic.
arch/arm/src/lpc54xx: Completes basic startup logic (sans clock configuration) and interrupt configuration.
arch/arm/src/lpc54xx: Add generic ARMv7-M start-up logic (needs LPC54628 customizations); add emtpy file that will eventually hold the clock configuration logic.
arch/arm/src/lpc54xx: Add (incomplete) SYSCON register definition header file.
arch/arm/src/lpc54xx: Add FLEXCOMM header file.
arch/arm/src/lpc54xx: Bring in tickless clock logic from LPC43; configs/lpcxpresso-lpc54628: mount procfs if enabled.
arch/arm/src/lpc54xx: Add RIT clock definitions; add SysTick initialization (not finished)
LPC54xx and LPCXpresso-LPC54628: add more boilerplate files and stubbed out files.
arch/arm/src/lpc54xx: Add (incomplete) USART header file.
Add another condition to a Kconfig; refresh a defconfig.
arch/arm/src/lpc54xx/chip: Add LPC54628 memory map header files.
configs/lpcxpresso-lpc54628: Add basic build files for the LPCXpresso-LPC54628
arch/: Basic build directory structure for the LPC54628
RNDIS support on STM32F4Discovery
* stm32f4discovery: Add stm32_netinit.c to avoid a compilation error
* stm32f4discovery: Add rndis initialization in stm32_bringup.c
NOTE: MAC address for the host side starts 0xaa. This assignment
scheme should be fixed later.
* stm32f4discovery: Add rndis configuration
NOTE: STM32F4Discovery + DM-STF4BB
* drivers/usbdev/rndis.c: Fix some issues in rndis.c
Introduce rndis_transmit() and change rndis_rxdispatch() to avoid
packet corruption. Introduce max packet size for dual speed which
is mainly used for high speed mode. Fix adjusting MTU warning
on Linux host. Fix data corruption if a packet size excceds MTU.
NOTE: Max packet size is not configured dynamically. This should
be fixed in the future version.
* stm32f4discovery: Modify #ifdef condition for rndis in stm32_bringup()
* drivers/usbdev/rndis.c: Change HPWORK to ETHWORK
* drivers/usbdev/rndis.c: Merge the commit 07b98ccbb5
Previous commit b09365784a was based on old rndis.c thus resulted
in reverting the commit 07b98ccbb5. This change merges the commit.
NOTE: In the commit 07b98ccbb5, max packet size of bulkout was
assumed to be 64. In this commit, priv->epbulkout->maxpacket is
used instead.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
This conversion is unfortunate in the sense that Unix local domain sockets are relatively lightweight. LocalHost UDP sockets are much heavier weight since they rely on the full UDP stack. If anyone is up for a complete redesign, then using some shared memory and a POSIX message queue would be lightweight again.
This commit also fixes several bugs that were not testable before the inode tree deadlock. I cannot say that the logic is 100% stable but it does not have basic functionality.
Squashed commit of the following:
fs/userfs: Order locking so that access to the shared I/O buffer is also locked.
fs/userfs: Converts to use LocalHost UDP loopback for IPC.
According to the specification, the close function must wait until all data
has been written before it closes the file (except O_NONBLOCK is set). The
maximum waiting time for this is not specified.
To be able to edit the file list of the process, the close function has to lock
the file list semaphore. After that the close function of the serial driver is
called.
Waiting for the complete transmission of all data is done in the serial driver.
This causes the semaphore to remain locked until all data has been sent.
However, no other thread of the process can edit the file list for that time
(open, close, dup2, etc.). This is not optimal in a multithreaded environment.
Therefore, we have to keep the waiting time within the driver as short as possible.
ieee802154: Simplifies notify() and rxframe() calls to a single notify() call. dataind's and all other "notifs" are now "primitives" which aligns with standard terminology
* mac802154: Adds missing breaks from case statement
* sixlowpan: Fixes bad logic where ACK is not requested if address is not a broadcast
* ieee802154: Simplification of "notifs" and "datainds" to generic primitives passed via a single notify call to the layer above the MAC
* Directories.mk should reference CONFIG_WIRELESS instead of CONFIG_DRIVERS_WIRELESS
* xbee_netdev: Network must be locked when calling sixlowpan_input
* sixlowpan: Reassembly buffer can't be freed if provided by radio driver
* sixlowpan: Don't free IOB if there is an error processing it as the MAC will try to pass it along to another receiver
* ieee802154: Adds basic logging to ieee802154_primitive.c
* Minor fixes after rebase
* xbee: Adds AT query timeout to retry if XBee doesn't respond to request
* same70-xplained: Adds Xbee support. Makes mikroBus slot Kconfig 'choice'
* mac802154: Removes unused function declaration
* drivers/mrf24j40: Fixes compilation error using . operator rather than -> operator
* mac802154_device: Changes a few mac802154_primtive_free's to ieee802154_primitive_free() and changes notif to primitive in a couple places.
* mac802154: Adds promiscous mode logic to bypass parsing of incoming frames. MAC char device also checks for promiscous mode and passes whole frames including header and FCS to the application if promiscous mode is enabled.
* sixlowpan: Fixes logic to correctly check if packet is large enough to include header. This would cause packets to be considered too small when they are sufficiently sized.
* sixlowpan: Fixes forwarding logic to use forwarding device rather than received device to look up destination link layer address
* net/ipforward: Fixes typo that caused build error when IP forwarding was enabled with CONFIG_NET_ICMPv6_NEIGHBOR enabled as well.
* configs/same70-xplained: Simple spelling fix
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Fix GPIO operation of STMPE811 driver.
Fixed issues:
1. STMPE811_GPIO_DIR was defined for register name
and later was redefined to be the pin direction mask
for `stmpe811_gpioconfig`
I decided to change register name to be STMPE811_GPIO_DIR_REG,
and keep pin direction mask STMPE811_GPIO_DIR, so that any
external code that already use this driver will be unchanged.
2. The STMPE811 register GPIO_DIR uses bit value 1 for output
and 0 for input, but `stmpe811_gpioconfig` set the opposite.
3. The call to `stmpe811_gpiowrite` from inside of `stmpe811_gpioconfig`
leaded to deadlock.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Squashed commit of the following:
net/icmpv6: IPPROT_ICMP6 socket logic now builds without error.
net/icmpv6: Add support for read-ahead and poll(). Initial commit is just cloned from ICMP with the appropriate name changes.
configs/: All defconfig filess that include CONFIG_NET_ICMPv6_SOCKET=y need to select CONFIG_SYSTEM_PING6=y and deselect CONFIG_DISABLE_POLL.
Update NSH documention to show that ping6 is now a built in command.
net/icmpv6: Add icmpv6_sendto.c and icmpv6_recvfrom.c. Initial versions are just clones from icmp/ with appropriate name changes.
net/icmpv6: Clone some ICMP socket logic as the beginning of support for ICMPv6 socket support.
Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET. Move prototype for icmpv6_ping from include/nuttx/net/icmpv6 to net/icmpv6/icmpv6.h
STM32L1, STM32L4 RTC: add periodic interrupts, update L1 RTC implementation
* STM32L4 RTC: add support experimental CONFIG_RTC_PERIODIC
* STM32 RTC: separate STM32L1 RTC into a separate file
STM32L1 RTC is very close to F4 or L4 versions, with two alarms
and periodic wakeup support so backported L4 peripheral to L1.
* RTC: add periodic alarms to upper and lower halves
Approved-by: Gregory Nutt <gnutt@nuttx.org>
The same interrupt handler is entered with the device structure parameter in all situations,
multiple or single PCA. One should still be careful if multiple PCA devices share the same IRQ.
Stm32 rtc small patches
* RTC: canceling an alarm marks it as inactive
* STM32L4, STM32F4, STM32F7 RTC: fix reading alarm value that is more than 24h in future
* STM32F0 RTC: fix backup register count in stm32_rtcc.h
All other STM32: SHIFTR_SUBFS_MASK was correct in STM32F0 only
* STM32L1: use correct EXTI line definitions
Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit adds a driver for this chip. Right now it measures bus voltage and current, and does not use the internal calibrated current reading, nor the available power measurement.
Change all calls to mq_receive() and mq_timedreceive() in the OS to calls to nxmq_receive() and nxmq_timedreceive(), making appropriate changes for differences in return values.
sched/mqueue: Add nxmq_receive() and mxmq_timedreceive() which are functionally equivalent to the standard mq_receive and mq_timedreceive() except that (1) they do not create cancellation points, and (2) the do not modify the application's errno variable.
Change all calls to mq_send() and mq_timedsend() in the OS to calls to nxmq_send() and nxmq_timedsend(), making appropriate changes for differences in return values.
sched/mqueue: Add internal function nxmq_send() and nxmq_timedsend() that are equivalent to mq_send() and mq_timedsend() except that they do not create cancellation points and do to not modify the errno variable.
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.
sched/signal: Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
Replace all usage kill() in the OS proper with nxsig_kill().
sched/signal: Add nxsig_kill() which is functionally equivalent to kill() except that it does not modify the errno variable.
Squashed commit of the following:
Change all calls to usleep() in the OS proper to calls to nxsig_usleep()
sched/signal: Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.
sched/signal: Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
This commit backs out most of commit b4747286b1. That change was added because sem_wait() would sometimes cause cancellation points inappropriated. But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.
In the OS, all calls to sem_wait() changed to nxsem_wait(). nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.
In all OS functions (not libraries), change sem_wait() to nxsem_wait(). This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.
sched/semaphore: Add the function nxsem_wait(). This is a new internal OS interface. It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
sched/semaphore: Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable. Changed all references to sem_post in the OS to nxsem_post().
sched/semaphore: Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable. Changed all references to sem_destroy() in the OS to nxsem_destroy().
libc/semaphore and sched/semaphore: Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable. Changed all references to sem_setprotocol in the OS to nxsem_setprotocol(). sem_getprotocol() was not used in the OS
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
configs/z80sim and xtrs: Serial driver lower halfs ioctl methods should return a negated errno value, not set the errno variable.
drivers/wireless: CC1101 driver not permitted to set errno.
drivers/sensors: LIS331DL driver not permitted to set errno.
drivers/lcd: ILI9341 initialize method not permitted to set errno,
drivers/serial: 16550 UART driver IOCTL method must not set errno; it must return a negated errno value.
drivers/usbdev/cdcacm.c: Change design for queuing RX packets that cannot be processed. Previous design had a logic problem that could cause data loss.
drivers/usbdev/cdcacm: Fixes one of two know design issues.
drivers/usbdev/cdcacm: First attempt to plug data leak in input flow control design. Still missing a few things.
configs/stm3210e-eval: Bring in new stm32_appinit.c, add board_initialize(), add support for FB character driver.
configs/stm3210e-eval: Rename stm32_appinit.c to stm32_bringup.c so that the start up logic is compatible with other, new boards.
drivers/video: fb driver now clears framebuffer initially. Eliminates (or minimizes) initial garbage on the display.
configs/open1788: Initialization now follows the pattern of other boards. Add initialization of fb driver.
configs/open1788: Add a configuration for testing the framebuffer driver.
drivers/xbee: Fixes a few warnings
* drivers/xbee: Fixes a few warnings
* configs/clicker2-stm32: Updates sections about i8sak usage in the README
Approved-by: Gregory Nutt <gnutt@nuttx.org>
drivers/wireless: Adds XBee S2C (802.15.4 firmware) support. XBee driver emulates mac802154 interface
* drivers/wireless/xbee: Adds xbee_netdev. Very similar to mac802154_netdev
* configs/same70-xplained: Starts adding support for XBee radio
* drivers/wireless/ieee802154/xbee: More structuring of XBee driver
* drivers/wireless/ieee802154/xbee: More Xbee work. Starts adding support on Clicker2
* drivers/wireless/ieee802154/xbee: More XBee MAC code
* configs/clicker2-stm32: More work to add XBee radio support
* drivers/wireless/ieee802154/xbee: Most of driver is now structured. No build errors
* configs/clicker2-stm32: Adjustments to XBee click module support
* drivers/xbee: Changes md_ prefix to xd_ prefix for xbeenet_driver_s fields
* drivers/xbee: XBee network device now passes MAC events via IOCTL
* drivers/xbee: Support querying device for parameters, setting parameters, and structures association/startpan logic
* configs/clicker2-stm32: Fixes Xbee lower half ATTN poll logic
* drivers/xbee: Removes dependce on CONFIG_IEEE802154_NETDEV
* drivers/xbee: Supports MAC RESET.request primitive
* drivers/xbee: Exposes generic AT query to the rest of driver
* drivers/xbee: Sets local values when writing setting change to Xbee device
* drivers/xbee: Finish association logic
* drivers/xbee: Adds xbee_get_mhrlen( ) allocating enough space for API frame header to frame
* drivers/xbee: Finishes transmit/receive logic
* drivers/xbee: Fixes xbee_netdev to match logic in mac802154_netdev.c
* drivers/xbee: Rearranges logic to prevent a loop condition where recursion could potentially occur to the point of deadlocking the system
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Merged in merlin17/nuttx/mac802154-sock (pull request #479)
wireless/ieee802154: Adds support for receiving MAC events via IOCTL through socket interface. Other small fixes and cleanup
* ioctl: Cleans up MAC802154IOC values
* wireless/ieee802154: Cleans up MAC802154IOC_NOTIFY_REGISTER logic in character driver
* wireless/ieee802154/mac802154_netdev: Adds support for MAC event notification via IOCTL
* wireless/ieee802154/mac802154: Changes reset logic. No longer reset extended address.
* wireless/ieee802154: Cleans up MAC802154IOC logic
Moves MAC802154IOC from ieee802154_ioctl.h and renames ieee802154_ioctl.h to ieee802154_device.h since it only contains types relevant to the MAC char device now.
* wireless/ieee802154/mac802154_device: Cleans up IOCTL logic for recent changes.
* drivers/wireless/ieee802154/mrf24j40: Adds missing break in case statement
* wireless/ieee802154/mac802154_netdev: Starts adding support for passing MAC events via IOCTL
* wireless/ieee802154/mac802154: Fixes issue with receiver enable logic
* wireless/ieee802154/mac802154: Fixes issue where extended address is cleared and not rewritten after radio reset
* configs/clicker2-stm32/mrf24j40-mac: Enables RAMLOG and wireless driver logging
* wireless/ieee802154/mac802154: Fixes poll logic meant to automatically choose address mode based on short address range.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
driver on STM32F4Discovery rev. C boards and attach the associated interrupt callback.
Added the argument parameter (FAR void *arg) to the interrupt handler provided by the LIS3DSH
driver to fit the definition for ISRs in xcpt_t.
Changed the check for working queue availability in lis3dsh interrupt handler to use work_available()
and not crash in case of an overrun.
drivers/video/fb.c: Framebuffer driver is code complete but as of yet untested.
drivers/video/fb.c: Add framebuffer character device. This is basically only the framework for the driver; a lot of logic is still missing.