Commit Graph

4252 Commits

Author SHA1 Message Date
Juha Niskanen
5c853cd1dc libs/libc/unistd/lib_getcwd.c: remove stray sched_unlock(). Also fixes several typos. 2019-09-20 06:23:48 -06:00
Juha Niskanen
e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
Gregory Nutt
a0ec67bc4c include/nuttx/sensors/ioctl.h: Commands for the VL53L1X did not follow the sequence. Noted by Daniel Pereira de Carvalho. 2019-09-18 07:30:29 -06:00
Alin Jerpelea
54ef3efc35 Merged in alinjerpelea/nuttx (pull request #1033)
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>
2019-09-18 11:42:35 +00:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Juha Niskanen
8fa646f0e8 drivers/syslog: syslog_force does not set errno so do not test against it. Some changes to comments. 2019-09-16 07:48:48 -06:00
YanLin Zhu
bcdf9074fe drivers/mtd/gd5f.c: Add gigadevice SPI NAND FLASH driver. 2019-09-15 08:33:22 -06:00
Gregory Nutt
254a906409 libs/libc/builtin/: builtint_isavail() should not set the errno variable because this functions may be used by internal OS logic for which setting the rrno variable would be inappropriate. 2019-09-11 12:37:29 -06:00
Nathan Hartman
366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Gregory Nutt
bf3105fc8f include/sys/types.h: Remove non-standard HP-UX priority range definitionis. HP-UX is not a supported OS. 2019-09-10 14:02:40 -06:00
Gregory Nutt
46d435fc65 Various cosmetic changes. 2019-09-09 14:47:47 -06:00
Nathan Hartman
91ef2ec394 Fix a few minor typos 2019-09-08 15:59:14 -06:00
Gregory Nutt
614c3b17ea include/sys/boardctl.h: Fix numbering of board IOCTL commands. Error in numbering noted by Nathan Hartman. 2019-09-05 15:34:39 -06:00
Augusto Fraga Giachero
5149fc557c include/nuttx/spi/spi_bitbang.c: Fix build error when the spi bitbang variable width support is enabled. 2019-09-05 13:40:41 -06:00
Augusto Fraga Giachero
f08ab217b0 drivers/rf/dat-31r5-sp.c: dd support to the DAT-31R5-SP+ digital attenuator. Creates a the new device driver directory drivers/rf/ to support drivers related to RF peripherals. It also adds support for the DAT-31R5-SP+ digital attenuator. 2019-09-05 13:28:28 -06:00
Juha Niskanen
822bb06967 Fix some typos. Also minor update to stm32f7/nucleo-144/README.txt and stm32l4/nucleo-l496zg/README.txt board documentation. 2019-09-05 08:12:50 -06:00
Matous Pokorny
925d16b7b8 drivers/sensors/isl29023.c: Add basic driver of ISL29023 ambient light sensor. The basic driver can set operational mode, range, and resolution. It can also read lux value in continuous mode. Interrupt and the alarm is not implemented. 2019-09-04 11:26:26 -06:00
Gregory Nutt
38ada48454 libc/libc/unistd/: Add stubs for setreuid(), and setregid(). NuttX does not currently support effective user/group IDs, but these stubs will support linkage of applications that expect these POSIX standard interfaces. 2019-09-03 11:35:31 -06:00
Gregory Nutt
a2bf7057f6 libc/libc/unistd/: Add stubs for geteuid(), getegid(), seteuid(), and setegid(). NuttX does not currently support effective user/group IDs, but these stubs will support linkage of appliations that expect these POSIX standard interfaces. 2019-09-03 10:57:51 -06:00
Augusto Fraga Giachero
68bbc8438c drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00
Gregory Nutt
85770966ff boards/Board.mk: Add support to pass dependency paths. boards/arm/cxd56xx/common/Makefile: Add correct dependency paths for board/ and src/ subdirectories. 2019-09-01 12:19:36 -06:00
Gregory Nutt
6266e067e9 net/: Re-order the content of all address-family socket 'connection' structures so that they begin with a comomon prologue. This permits better use of logic for different address family types. 2019-09-01 08:47:01 -06:00
Gregory Nutt
c6434e3182 boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig: Correct shit defconfig file. Recent patch dumped a prohibited .config file as the defconfig file when a proper defconfig file created via 'make savdefconfig' is required. Bad. 2019-08-31 14:35:17 -06:00
Gregory Nutt
a52ceac13e net/: Now handles reception of IPv4 packets with larger IPv4 headers containing options. 2019-08-31 12:25:30 -06:00
Gregory Nutt
9bdde04636 net/Kconfig: Ethernet packet buffer size cannot be permitted to go below 1294 is IPv6 is selected. 2019-08-31 09:08:32 -06:00
Gregory Nutt
58743b7488 The non-standard, non-portable type cpu_set_t was created specifically to support the NuttX internal, SMP implementation. Any resemblance to any other cpu_set_t would be purely coincidental. However it appears that that coincidence has occurred. cpu_set_t is an equivalent, non-standard, non-portable type in the GNU C library. Compilation of libgnat expects this non-standard type to be defined. Who am I to standard in the way of progress? This commit removes the conditioning on CONFIG_SMP so that cpu_set_t is typed (as a uint8_t) even if CONFIG_SMP is not defined. Reference: Bitbucket issue 164. 2019-08-29 10:03:01 -06:00
Augusto Fraga Giachero
d6ad7ebd47 drivers/sensors/adt7320.c: Add support for the ADT7320 temperature sensor. 2019-08-28 15:35:43 -06:00
Gregory Nutt
53d5e44d89 Cosmetic updates. 2019-08-28 15:14:27 -06:00
Augusto Fraga Giachero
4710ae736c drivers/analog/dac7554.c: Add support to the DAC7554 digital-to-analog converter. 2019-08-28 07:01:17 -06:00
Gregory Nutt
5f02b0335f syscall/ and related: Fix an error found in build testing. Inconsistent conditional compilation led to link errors in certain configurations. 2019-08-27 16:41:07 -06:00
Nicholas Chin
f40aac87e8 arch/arm/src/imxrt: Adds quadrature encoder driver for IMXRT. 2019-08-27 15:01:09 -06:00
Gregory Nutt
dbd1bb1f1e All function pointer types should be prefaced by the qualifier CODE (unless the callable function is known to reside in RAM, then it should be FAR). 2019-08-26 17:31:29 -06:00
zhangyuan7
ba598841e5 net/tcp/Kconfig, include/nuttx/net/netconfig.h: Make RTO and WAIT_TIME configurable. This fix is not really correct: TCP RTO really should be calculated dynamically for each TCP connection: http://sgros.blogspot.com/2012/02/calculating-tcp-rto.html. 2019-08-26 11:03:27 -06:00
Gregory Nutt
da9433a4c7 Fix another warnings and an error in typing introduced in the previous commit related to BINFS in PROTECTED mode. 2019-08-25 18:37:23 -06:00
Gregory Nutt
19b94da468 Fix a couple of warnings in last commit (one was really an error). 2019-08-25 17:37:13 -06:00
Gregory Nutt
f751aff7fe boards/boardctl.c and libs/libc/builtin: The BINFS file system uses the same builtin library and builtin arrays as does NSH. The builtin arrays are simple name-value pairs that map builtin function names with the user-space entry point. In the FLAT build, the builtin arrays are available everywhere via the backdoor left open by the FLAT address space. In the PROTECTED build, however, the kernel must maintain its own reference to the user-space builtin array. This commits adds those kernel globals and a new boardctl(BOARDIOC_BUILTINS) that can be used by applications to the provide the builtin list reference to the kernel. 2019-08-25 16:58:43 -06:00
Michael Jung
decd07725f arch/arm/src/stm32/stm32_spi.c: TI Synchronous Serial Frame Format. The SPI macros on STM32 MCUs do support the Texas Instruments Synchronous Serial Frame Format protocol (TI protocol). Defined a new SPIDEV_MODETI and add support for it in stm32_spi.c. 2019-08-25 09:07:09 -06:00
Gregory Nutt
3c30cf1f05 Squashed commit of the following:
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.
2019-08-23 13:20:52 -06:00
Gregory Nutt
bff30ff9bc Fix minor typo / copy-paste. 'cancellaction point'->'cancellation point' 2019-08-23 11:57:35 -06:00
Gregory Nutt
dd97fb991b This commit moves shared builtin information out of binfmt/libbuiltin and into libs/libc/builtin where it can be shared. This should permit builtin application in the PROTECTED build where binfmt/libbuiltin is not available in user space.
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.
2019-08-23 09:07:40 -06:00
Alin Jerpelea
6ecee7e403 Merged in alinjerpelea/nuttx (pull request #1021)
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>
2019-08-23 13:28:35 +00:00
Alin Jerpelea
d6366c1e82 Merged in alinjerpelea/nuttx (pull request #1019)
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>
2019-08-22 13:55:35 +00:00
Alin Jerpelea
a91d86523c Merged in alinjerpelea/nuttx (pull request #1018)
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>
2019-08-22 12:49:05 +00:00
Nathan Hartman
be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Ivan Ucherdzhiev
19c070e0d1 drivers/mmcsd: Added support for MMC(eMMC) bigger than 2 GB (Tested with IMXRT1050EVKB and samsung eMMC 16GB). arch/arm/src/imxrt: IMXRT uSDHC driver cmd line reset logic modified. 2019-08-21 09:23:29 -06:00
Alin Jerpelea
c6355f58d6 Merged in alinjerpelea/nuttx (pull request #1014)
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>
2019-08-21 13:39:29 +00:00
Michael Jung
469859b9f1 Kconfig, include/debug.h, and drivers/contactless: Add debug macros for contactless. The various contactless device drivers currently define device specific debug macros within their local header files. This patch adds generic ctls[info|warn|err] macros for the overall contactless subsystem to be used in future drivers. Ported the two currently available contactless device drivers (mfrc522.c and pn532.c) to these generic logging macros and fixed some logging bugs
along the way.
2019-08-19 11:27:23 -06:00
Anthony Merlino
70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
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>
2019-08-16 22:42:25 +00:00
Beat Küng
ef233507db Merged in bkueng/nuttx/serial_single-wire_pullup (pull request #994)
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>
2019-08-15 21:58:52 +00:00
Pavel Pisa
fd237a87d1 include/sys/syscall.h: Correct some typos. 2019-08-13 16:12:58 -06:00