This change decouples that upper activity-based logic from the lower random walk logic and allows use of other upper state detection logic (such as a custom, application-specific state machine).
net/netlink/netlink_route.c: Add Netlink socket NETLINK_ROUTE support for getting a snopshot of the Neighbor table.
net/neighbor/neighbor_snapshot.c: Add neighbor_snapshot() that will eventually be used by the Netlink sockets. Also fixed naming violation 'struct neighbor_entry' -> 'struct neighbor_entry_s'.
include/nuttx/net/neighbor.h: Expose format of the IPv6 neighbor table for use with Netlink sockets.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.
Squashed commit of the following:
Author: Xiang Xiao <xiaoxiang@pinecone.net>
include/nuttx/b2c.h and libx/libc/string: Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.
Author: Gregory Nutt <gnutt@nuttx.org>
Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
tools/: Fix the minor issue in Makefile
Author: Gregory Nutt <gnutt@nuttx.org>
drivers/rptun/rptun.c: Review for coding standard. Run against tools/nxstyle.
tools/LibTargets.mk: Fix some TABs that were turned into spaces by a copy-paste.
fs/hostfs: Add configure and build support for hostfs RPC.
drivers/timer: Add configure and build support for syslog RTC.
drivers/syslog: Add configure and build support for syslog RPC.
drivers/serial: Add configure and build support for serial RPC.
Kconfig, tools/*.mk. openamp/: Add basic OpenAMP build support.
drivers/rptun: Add configure and build support for OpenAMP tunnel drivers.
drivers/net: Update Make.defs and Kconfig for OpenSDA support.
Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c. These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux. Removed because we want to separate the activities. We will just try to get the basic OpenAMP support in place for now.
Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h. These are specific to the Xiaomi application.
Author: zhuyanlin <zhuyanlin@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Jianli Dong <dongjianli@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Guiding Li <liguiding@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
board/boarctl.c: Add support for the new BOARDIOC_ROMDISK command. This allows applications to create ROMFS block drivers without illegal direct calls to romdisk_register.
include/sys/boardctl.h: Add basic definitions to support a ROM disk creation boardctl() command.
Squashed commit of the following:
drivers/: Run tools/nxstyle against all drivers/*.c.
boards/boardctl.c: Add new boardctl() command, BOARDIOC_MKRD, that can be used to create a RAM disk. This will replace the illegal call to ramdisk_register() currently used by NSH.
drivers/mkrd.c: Add wrapper around ramdisk_register() for creating a proper ramdisk.
According to earlier standards, usage of select(), FD_CLR, FD_ISSET, FD_SET and FD_ZERO
just need include headers: sys/time.h, sys/types.h and unistd.h. So include sys/select.h
in time.h to compatible with it. Or mbedtls library would build break in calling select()
and FD_* related functions.
https://pubs.opengroup.org/onlinepubs/007908799/xsh/select.html
Most of the bluetooth and wifi chips appear to need external firmware, and the 43438 is no exception. Fortunately, since Cypress got involved, these are much more straightforward to obtain and are shipped as part of their SDK, which is downloadable from their website. Those firmwares are already provided as C arrays, so their names just need updating to;
const unsigned char bt_firmware_hcd -> The bt firmware array.
const int bt_firmware_len = sizeof(bt_firmware_hcd);
boards: spresense: Add board initialization for isx012
Add isx012 initialization to the board and include the needed headers
Approved-by: Gregory Nutt <gnutt@nuttx.org>
task_spawn() and posix_spawn() are NuttX OS interfaces. In PROTECTED and KERNEL build modes, then can be reached from applications only via a system call. Currently, the number of parameters in a system call is limited to six; these spawn function have seven parameters. Rather than extend the maximum number of parameters across all architectures, I opted instead to marshal the seven parameters into a structure.
*
In order to support builtin in function in protected mode, a task_spawn() system call must be supported. Unfortunately this is overly complex because there is a (soft) limit of 6 parameters in a system call; task_spawn has seven paramters. This is a soft limit but still difficult to extend because it involves assembly language changes to numerous architectures. Better to get more creative.
Squashed commit of the following:
Correct some additional compile-related issues.
Move include/nuttx/binfmt/builtin.h to include/nuttx/lib/builtin.h. Move apps/builtin/lib_builtin_forindex.c to libs/libc/builtin/lib_builtin_forindex.c.
Move binfmt/libbuiltin to libs/libc/builtin. There are calls made directly from apps/nshlib into this logic and hence, must be part of a library that can be shared between the OS and applications.
boards: cxd56xx: add SCU sensors (2/2)
* boards: cxd56xx: add cxd56_bh1721fvc initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_bh1745nuc initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_bm1383glv initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_bm1422gmv initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_bmi160 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_bmp280 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_kx022 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_lt1pa01 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_rpr0521rs initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_sensors initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arch: arm: cxd56: add Backup Log driver
The driver will be used to backup logs on crash.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: common: add crashlog driver
Add Crashlog driver with support for reset on crash
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: move gs2200m initialization
Move the board gs2200m initalization to the common board folder
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: move ili9340 initialization
Move the board ili9340 initalization to the common board folder
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: move lpm013m091a initialization
Move the board lpm013m091a initalization to the common board folder
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: common: typo fixes
HEADER: Updates on file location
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Add the sensor initialization for cxd56xx boards in the common board folder
* boards: cxd56xx: apds9930: typo fix
fix apds9930 typos
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_ak09912 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: move cxd56_bmi160 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_apds9930 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: add cxd56_apds9960 initialization
We are adding the sensor initialization for cxd56xx boards in the
common board folder.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: cxd56xx: add SCU sensors
* drivers: platform: add Avago APDS9930 Proximity and Ambient light Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Rohm BH1721FVC Ambient Light Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Rohm BH1745NUC Color Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Rohm BM1383GLV/BM1383AGLV Pressure Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Rohm BM1422GMV/BM1422AGMV Magnetic Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Bosch BMI160 Sensor support
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Bosch BMP280 Barometic Pressure Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Kionix KX022/KX122 Acceleration Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Murata LT1PA01 Proximity and Ambient light Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: spresense: add Rohm RPR0521RS Proximity and Ambient light Sensor
This sensor is connected to the SCU on spresense board
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: sensors: bmi160: add optional I2C address
Add a menu option for the case when the SDO pin is pulled to VDDIO
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: add stub drivers folder for later use
* boards: add stub drivers folder for later use
The board/drivers folder is added for future use.
In this folder we should place drives that are platform specific and
depend on HW that is present only on a specific platform.
NOTE: All shared drivers should go to the regular driver folder
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tools: shift BOARD_DIR one level up
In preparation for drivers and common folders we are moving the
BOARD_DIR path up one level.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tools: add drivers/platform symlink
Link the boards/<arch>/<chip>/drivers dir to drivers/platform
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: add platform specifc drivers extension
There are platforms that use specific drivers and we should be able to
include those drivers in the build
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* board: cxd56xx: drivers: add AK09912 driver for SCU
This is a platform specific driver connected on the SCU unit.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Iobinstrumentation
* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.
* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.
* fs/procfs: Starts adding support for /proc/iobinfo
* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry
Approved-by: Gregory Nutt <gnutt@nuttx.org>
serial single-wire: add possibility to specify pull-up instead of open drain
Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
ieee802154: Support dynamic FCS length. Adds IEEE802154_ATTR_PHY_FCSLEN.
This change introduces IEEE802154_ATTR_PHY_FCSLEN which the radio layer can support to set/get the FCS length that's added to the end of the frame. One use case, in promiscuous mode, is to add back in the FCS of the received frame by increasing the iob->io_len by the FCS length.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
wireless/ieee8021254: Adds support for energy detect.
Adds support for energy detect by introducing a new radio call/callback, as the PHY layer is required to perform the energy detect.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Master
* Revert "Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)"
This reverts commit aef0e0b538.
* arch/arm/src/{stm32/stm32f7/stm32h7/stm32l4}/stm32_pwm.c: configure multi-channel duty only if channel specified. This allows you to update duty cycle for a single channel
* nucleo-f303re/configs: add basic NSH configuration
* nucleo-f303re/configs/pwm: enable console on UART2 and set entry point to nsh_main
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Added stubbed implementations of getpwuid, getpwuid_r, getpwnam, and
getpwnam_r. These functions are essentially stubs pretending that NuttX
supported users and that the only configured user in the system was 'root'
with uid 0. The intend is not to provide meaningful new features, but to ease
porting of foreign source code to NuttX.
- Added an alphasort implementation
- Added a scandir implementation
- Added DT_* literals to include/dirent.h: Apparently those are not required by POSIX, but are part of 4.3BSD and available in glibc as well.
Libwebsockets initializes the 'sin_zero' member of sockaddr_in objects to zeros.
Apparently, judging from mailing list entries, there are platforms on which incliinclunot
doing this causes undefined behaviour.
On NuttX compiling respective code is broken, as the corresponding member
variable is called '__pad'. Neither in the 'nuttx' nor in the 'apps'
respository did I find any reference to this identifier. Thus, I believe its a
safe bet to just rename it.
UNIX Network Programming states in this regard:
"The POSIX specification requires only three members in the structure: sin_family,
sin_addr, and sin_port. It is acceptable for a POSIX-compliant implementation to
define additional structure members, and this is normal for an Internet socket
address structure. Almost all implementations add the sin_zero member so that all
socket address structures are at least 16 bytes in size."
Testing of the WiFi is minimal so far but functionality is proven. I'm specifically not happy that the driver doesn't recover elegantly from a DMA data checksum failure, but that is an issue that can be dealt with in due course ... I'm trying to get the rest of the interfaces fleshed out and the hardware proven so it can go for pre-production build. I _think_ there's only Bluetooth and USB-device left to implement now.
drivers/lcd/tda19988.c: Now uses the new common videomode structure of include/nuttx/video/videomode.h as do other video components.
video/, include/nuttx/video/videomode.h: Separate EDID and from videomode managment. They really are separate things.
drivers: video: add basic Video Stream support
basic video stream and capture implementation based on the
spresense SDK code release
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Squashed commit of the following:
net/: Fix some naming inconsistencies, Fix final compilation issies.
net/inet/inet_close(): Now that we have logic to drain the buffered TX data, we can implement a proper lingering close.
net/inet,tcp,udp: Add functions to wait for write buffers to drain.
net/udp: Add support for notification when the UDP write buffer becomes empty.
net/tcp: Add support for notification when the TCP write buffer becomes empty.