Commit Graph

273 Commits

Author SHA1 Message Date
Gregory Nutt
108ffe7044 Within the OS, nxisg_sleep() should be used instead of sleep(). sleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 19:03:24 -06:00
Gregory Nutt
244437257b drivers/: Within the OS, nxisg_usleep() should be used instead of usleep(). usleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 17:37:39 -06:00
Xiang Xiao
3bc62f1ccc Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:39:12 -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
Augusto Fraga Giachero
d6ad7ebd47 drivers/sensors/adt7320.c: Add support for the ADT7320 temperature sensor. 2019-08-28 15:35:43 -06: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
60f777b8f4 Fix various typos in documentation and comments. 2019-08-09 14:35:07 -06:00
Markus Bernet
1e0987a729 drivers/sensors/sht3x.c: Add Sensirion SHT3x driver. 2019-08-08 07:34:15 -06:00
Juan Flores
d2e884f43c drivers/sensors/vl53l1x.c: Added support for VL53L1X TOF sensor. 2019-07-10 07:58:20 -06:00
Alin Jerpelea
ffb4f00da9 Merged in alinjerpelea/nuttx (pull request #944)
drivers: sensors: add I2C Bosch BMP280 and I2C Asahi AK09911/AK09912 Compass Sensor

* drivers: sensors: add Bosch BMP280 Barometic Pressure Sensor

    add driver for the Bosch BMP280 barometic pressure sensor
    This sensor is connected over I2C bus

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: sensors: add Asahi AK09911/AK09912 Compass Sensor

    add driver for AK09911/AK09912 Compass sensor over I2C bus

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-10 11:31:36 +00:00
Gregory Nutt
c2a383ef6d drivers/sensors/vl53l1x.c: Remove the VL53L1x driver. It does not compile. 2019-06-29 06:26:49 -06:00
Gregory Nutt
4083d89244 configs/olimex-stm32-e407: Add VL53L1 support. drivers/sensors/vl53l1x.c: A few compiler errors fixed, possibly incorrectly. DRIVER DOES NOT COMPILE. Marked EXPERIMENTAL in the Kconfig file. 2019-06-28 15:45:00 -06:00
Gregory Nutt
4f9623a520 drivers/sensors/vl53l1x.c: Fix other cosmetic coding standard issues. 2019-06-28 09:15:29 -06:00
Gregory Nutt
696197c67f drivers/sensors/vl53l1x.c: Fix more upper-/lower-case problems. 2019-06-28 08:39:21 -06:00
Gregory Nutt
6a75c811f8 Fix some lower vs upper case problems in last commit. 2019-06-28 08:20:31 -06:00
Juan Flores
f466d054a1 drivers/sensors/vl53l1x.c: Add support for VL53L1X TOF sensor. 2019-06-28 08:17:35 -06:00
Alin Jerpelea
977893d5a7 Merged in alinjerpelea/nuttx (pull request #912)
configs: spresense: enable BMI160_I2C sensor

* drivers: sensors: add BMI160 driver

    Enable driver support for the Bosch BMI160 Inertial
    Measurement sensor

    This driver can be used with the BMI160 sensor connected over
    SPI or I2C bus

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* configs: spresense: enable BMI160_I2C sensor

    Enable BMI160 sensor connected over I2C on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-20 13:32:36 +00:00
Fabian Justi
beaa54cc4c Merged in Justifa/nuttx (pull request #885)
drivers/sensors/as726x.c Fix little change from tools/indent.sh

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-06 13:36:58 +00:00
Gregory Nutt
900c32c021 Substantial changes to last PR which was not close to the coding standard. Files ran through tools/indent.sh. 2019-06-05 07:21:55 -06:00
Fabian Justi
ff5f1945ec Merged in Justifa/nuttx (pull request #883)
Add support for AS726X spectral sensor

* configs/nucleo-l476rg/src/stm32_appinit.c Add I2C tool to board init

* configs/nucleo-l476rg/src/stm32_bmp180.c Fix comment

* configs/stm32f103-minimum/src/stm32_veml6070.c Fix name in error message

* drivers/sensor, include/nuttx/sensors and configs/nucleo-l476rg: Add support for AS726X spectral sensor

    Implement driver for AS726X spectral

    read as726x V,B,G,Y,O,R channel

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-05 12:50:03 +00:00
Juha Niskanen
c77e016ee8 arch/arm/src/stm32l4, drivers/sensors/t67xx.c: Fix trivial build failures caused by recent commits 2019-05-31 07:22:02 -06:00
Gregory Nutt
b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Gregory Nutt
49b2b74105 drivers/sensors/apds9960.c: Initial state of allocated structure was not being set. Noted by Leif Jacob. 2019-05-06 09:10:25 -06:00
Gregory Nutt
abf6965c24 Squashed commit of the following:
libs/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    syscall/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    wireless/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    Documentation/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    include/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    drivers/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    sched/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    configs:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/xtensa:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/z80:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/x86:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/renesas and arch/risc-v:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/or1k:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/misoc:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/mips:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/avr:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/arm:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
2019-04-29 14:52:05 -06:00
Matous Pokorny
1e54a14c9f Fix some typos in comments. 2019-04-15 07:56:53 -06:00
Matous Pokorny
245bf33eb3 configs/nucleo-l476rg/src/stm32_gpio.c, configs/stm32f103-minimum/src/stm32_gpio.c, and drivers/sensors/zerocross.c: Fix some errors when debug assertions are enabled. 2019-03-29 09:11:08 -06:00
Gregory Nutt
47b6f7876e Remove spaces from Kconfig 2019-03-25 11:16:21 -06:00
Gregory Nutt
e159cc673c drivers/sensors/mpu60x0.c: Additional, cosmetic review changes. 2019-03-07 17:10:13 -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
dc8c814ca3 Squashed commit of the following:
Fixed coding standard error in several files.  Use of while( is incorrect; a space is required between while and (.  Also ran tools/nxstyle and fix thoses complaints as well in most files.

    Changes to comply with coding standard.  Mostly focused on files with missing space after keyword in if(, switch(, and for(.  Offending files also got changes to comply with tools nxstyle.  If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh.  Still need to fix occurrences of while( with missing space.  There are a lot of them.
2019-02-27 08:41:08 -06:00
Xiang Xiao
fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao
5e8ae23edc drivers/timers/oneshot.c: Support signal notification through SIGEV_THREAD
drivers/timers/rtc.c:  Support signal notification through SIGEV_THREAD
drivers/input/ajoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/djoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/button_upper.c:  Support signal notification through SIGEV_THREAD
drivers/sensors/zerocross.c: Support signal notification through SIGEV_THREAD
drivers/wireless/ieee802154:  Support signal notification through SIGEV_THREAD
drivers/lcd/ft80x.c: Support signal notification through SIGEV_THREAD
2019-01-27 08:53:12 -06:00
Ken Pettit
427f8c743c drivers/sensors/ina3221.c: Fix errors in regiser field address. Signed value was losing its signed-ness due to use of unsigned type for register. 2019-01-26 09:33:58 -06:00
Gregory Nutt
e74cabf923 Cosmetic changes from review of last PR. 2019-01-09 07:49:19 -06:00
Jussi Kivilinna
d4a38a8974 Merged in jussi_kivilinna/nuttx/sensirion_drivers (pull request #809)
Drivers for Sensirion SCD30, SGP30 and SPS30 sensors

* drivers/sensors: add driver for Sensirion SCD30 CO2 sensor

* drivers/sensors: add driver for Sensirion SGP30 gas sensor

* drivers/sensors: add driver for Sensirion SPS30 particulate matter sensor

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-09 13:35:44 +00:00
Gregory Nutt
5a342e8129 drivers/sensors/bmp180.c: Eliminate some warnings 2019-01-02 17:24:14 -06:00
Alan Carvalho de Assis
2129ce134c drivers/sensors/mlx90614.c: Fix MLX90614 to reflash new device address 2018-11-02 07:05:40 -06:00
Alan Carvalho de Assis
9689448d2a drivers/sensors/mlx90614.c: Add support for the Infrared Thermometer MLX90614 2018-10-28 15:58:14 -06:00
Daniel P. Carvalho
3abe871a80 drivers/sensors/ina226.c: Add INA226 device driver. 2018-10-19 09:04:56 -06:00
raiden00pl
af8a002a10 Merged in raiden00/nuttx_h7 (pull request #720)
I2C support for STM32H7

* stm32h7/chip.h: update peripherals

* stm32h7x3xx_rcc.h: update definitions

* stm32h7x3xx_rcc.c: remove some unused code and configure I2C clocks

* stm32h7: add lower half I2C driver (based on F7 I2C driver)

* configs/nucleo-h743zi: add LSM303AGR and LSM6DSL configuration

* Remove whitespace

* sensors/lsm303agr.c, sensors/lsm6dsl.c: add mising include, remove whitespace

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-16 15:58:25 +00:00
Ouss4
adda352b15 drivers/sensors/dhtxx.c: Driver for DHTxx sensor. 2018-09-01 07:25:30 -06:00
Gregory Nutt
11a1b2598e Fix some naming convention violations in the last commit. 2018-08-25 08:30:28 -06:00
DisruptiveNL
cd2ced4d9a drivers/sensors and configs/nucleo-l476g: Add support for LSM303AGR and LSM6DSL sensors 2018-08-25 08:19:31 -06:00
Xiang Xiao
e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Gregory Nutt
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Gregory Nutt
10069067c1 include/nuttx/i2c/i2c_master.h: Rename I2C_M_NORESTART to I2C_M_NOSTART since it may be used in other contexts than a repeated start. Add comments to clarilfy setup for repeated start. 2018-08-03 08:51:55 -06:00
Russ Webber
ee21bcfaa8 Merged in russkel/nuttx/russkel/adxl345-remove-comment-references-to-tou-1533231727620 (pull request #702)
adxl345: remove comment references to touchscreens

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-02 17:59:59 +00:00
Gregory Nutt
b8665996d5 Revert 0eff3d530f: This removes the kx224, bh1749nuc and bh1790glc. These are very nicely written drivers, but they are based on some external sequencer logic which is not available to everyone. Hence, these are inapropriate to carry in the NuttX repository. 2018-07-11 15:36:33 -06:00
Gregory Nutt
235d580984 drivers/sensors/bh1749nuc.c, bh1790glc.c, and x224.c: From review of commit 0eff3d530f, remove dependency on the CXD56_SCU, modify inclusions and some naming for compatibility with other sensor drivers. 2018-07-10 16:16:15 -06:00
Juho Valkama
0eff3d530f Merged in jutava/nuttx (pull request #673)
Master

* drivers/sensors: added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* bh1790glc.h created online with Bitbucket

* bh1790glc.h deleted online with Bitbucket

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* README.txt: minor typo fix

* Minor typo fix

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-10 12:38:25 +00:00
Alan Carvalho de Assis
5fb988bdc8 ~configs/xmc4500-relax: Add support to MAX6675 on XMC4500-Relax board. drivers/sensors/max6675.c: Increases SPI frequency from 400Khz to 4MHz. 2018-06-16 13:48:19 -06:00
Juha Niskanen
5b899b76c4 drivers/sensors: Add support for Telair T6713 carbon dioxide sensor 2018-06-15 06:52:16 -06:00
Gregory Nutt
96b6bf92a3 Cosmetic changes from review of last 2 PRs. 2018-05-02 16:46:12 -06:00
Anthony Merlino
b1275abd4b Merged in antmerlino/nuttx/ina3221 (pull request #636)
drivers/sensors: Adds support for INA3221 power sensor. This has a 3 channel bus/shunt voltage pairs.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-05-02 22:29:59 +00:00
Juha Niskanen
3cf830bd67 Merged in juniskane/nuttx_stm32l4/1wire_sht21_changes_pr (pull request #631)
drivers/1wire: add PM hooks and unlink support to sht21 sensor (allowing hot-swappable I2C bus from 1-wire converter)

* drivers/1wire: add PM hook to 1wire bus

* drivers/1wire/ds28e17.c: i2c instance must be zeroed

* drivers/sht21: add unlink support

    Unlike most other unlink implementations in NuttX drivers, this one
    does not allow any I2C operations after unlink, making it possible to
    deallocate the I2C bus.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-24 13:21:02 +00:00
Alan Carvalho de Assis
2dfea90198 drivers/sensors/apds9960.c: Fix APDS9960 work queue BUG found by Kyle Lei 2018-04-10 06:53:11 -06:00
Tiago Almeida
a482867c00 drivers/sensors/max31855: Add multiple max31855 sensors feature and support for bambino-200e and stm32f4discovery 2018-04-09 15:36:27 -06:00
Bob Feratich
d893c5b55e This commit adds LSM330 SPI and ADXL372 drivers.
Squashed merge of the following:

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/sensors:  Fix some minor typos in last commit that cause some compile problems.
    drivers/sensors/:  Clean up some coding standard isses in LM330 and ADXL372 drivers.
    drivers/sensors/README.txt:  Clean up some long lines and odd line breaks.
    include/nuttx/sensors:  Completes coding style review of adxl372.h, cluster_driver.h, and lsm330.h.

Author: Bob Feretich <bob.feretich@rafresearch.com>
    Add LSM330 SPI and ADXL372 drivers along with the cluster driver infrastructure.
2018-04-07 14:47:27 -06:00
Juha Niskanen
bcd1f1f774 drivers/sensors/sht21: Change I2C_TRANSFER return value so that it return on zero on success, not the count of bytes transferred. 2018-03-22 06:44:40 -06:00
Jussi Kivilinna
02841a7f55 drivrs/sensors/lis2dh: Clear INT1 at SNIOC_WRITE_INT1THRESHOLD ioctl 2018-03-21 07:28:08 -06:00
Juha Niskanen
c268288c17 drivers/sensors: Add support for Sensirion SHT2x humidity sensor 2018-03-13 08:26:15 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00: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
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
fad70bf90e Update some comments 2018-02-03 09:35:46 -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
Juha Niskanen
a5cb1129f9 drivers/sensors/lis2dh: use realtime clock if monotonic is not available 2018-01-31 07:41:56 -06:00
Juha Niskanen
dafa72edc3 drivers/sensors: add support to MAX44009 ambient light sensor 2018-01-29 07:56:06 -06:00
ussi Kivilinna
5392955ec4 drivers/sensors/hts221.c: Fix sensor reset with BOOT bit 2017-12-20 10:11:52 -06:00
Gregory Nutt
5328e3bafb configs/: CONFIG_QENCODER was renamed to CONFIG_SENSORS_QENCODER: update occurrences in several Kconfig files 2017-11-25 18:46:43 -06:00
Jussi Kivilinna
0ea4d2a11d sensors/lis2dh: fix use of obsolete dbg macro 2017-10-27 06:13:14 -06:00
Jussi Kivilinna
e557c3e8d5 drivers/sensors/lis2dh: fixes for self-test 2017-10-26 09:25:20 -06:00
Alan Carvalho de Assis
0be36a6ac1 drivers/sensors/apds9960.c: Use work_queue to read/process data when receive an IRQ 2017-10-20 08:54:44 -06:00
Jussi Kivilinna
fe9be72bec drivers/sensors/hts221: power-on sensor for loading calibration data 2017-10-20 08:33:44 -06:00
Alan Carvalho de Assis
3268a6ac5f drivers/sensor: Add driver for the APDS-9960 gesture sensor 2017-10-20 06:37:38 -06:00
Sebastien Lorquet
d16d4d5568 The INA219 is a combined voltage and current sensor that can measure up to 26 volts and a current that depends on an external shunt resistor. Connection happens via i2c/smbus and the chip features a power supply rail that is independent from the measured voltage, so it can measure low voltages.
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.
2017-10-10 17:03:56 -06:00
Gregory Nutt
4810499d3a Squashed commit of the following:
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.
2017-10-07 10:57:09 -06:00
Gregory Nutt
936df1bcb5 Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
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.
2017-10-06 10:15:01 -06:00
Gregory Nutt
29b5b3667f sched/semaphore: sem_timedwait() is a cancellation point and, hence, cannot be called from within the OS. Created nxsem_timedwait() that is equivalent but does not modify the errno and does not cause cancellation. All calls to sem_timedwait() change to calls to nxsem_timedwait() in the OS. 2017-10-05 07:24:54 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
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.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
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
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
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.
2017-10-03 12:52:31 -06:00
Gregory Nutt
8394f9b60f Squashed commit of the following:
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.
2017-09-30 12:59:33 -06:00
Gregory Nutt
0f04816b37 Trivial changes from review of last PR. 2017-09-14 14:55:50 -06:00
Florian Olbrich
6f57d1d472 lis3dsh.c edited to obey the nuttx coding standard. 2017-09-14 20:29:41 +00:00
Florian Olbrich
b1e625eacb Added initialization code and Kconfig entries to set up the LIS3DSH accelerometer
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.
2017-09-14 20:03:28 +02:00
Gregory Nutt
5129aeefd5 drivers/sensors: Fix remaining naming of configurations to be compliant for two more drivers. 2017-08-24 10:48:20 -06:00
Gregory Nutt
dc8f3778a9 drivers/sensors: Fix more naming of configurations to be compliant for two more drivers. Still a few more to go. 2017-08-24 10:26:53 -06:00
Gregory Nutt
1f023fa31a drivers/sensors: Fix more naming of configurations to be compliant for two more drivers. Still a few more to go. 2017-08-24 10:10:00 -06:00
Gregory Nutt
269107afc8 drivers/sensors: Make naming configuration compliant for two more drivers. Still several to go. 2017-08-24 09:54:23 -06:00
Gregory Nutt
7f4af7b690 drivrs/sensors: Make a few other configuration settings consistent with the (undocumented) standard. 2017-08-24 09:45:46 -06:00
Gregory Nutt
5dd25bbfde Missed two naming changes in last commit 2017-08-24 09:32:24 -06:00
Gregory Nutt
9e386e3b31 drivrs/sensors/hts221: Fix inconsistent configuration variable naming; Try to bring closer to an as-of-yet undocumented naming convention. 2017-08-24 09:22:36 -06:00
Alan Carvalho de Assis
1048a3b871 drivers/sensors/hc_sr04.c: Replace busy wait with semaphone. Using this solution we don't need 60ms delay. 2017-08-18 09:44:38 -06:00
Alan Carvalho de Assis
50e2e08742 drivers/sensors: Add support to HC-SR04 distance sensor 2017-08-17 18:52:54 -06:00
Juha Niskanen
0113b0db95 drivers: handle I2C_TRANSFER return value consistently. Some I2C peripherals transfers return zero on success, others number of completed transfers. Make drivers robust against this. 2017-08-04 07:31:36 -06:00
Gregory Nutt
ee4b69f0d3 Review of last PR. Fixes many coding standard problems. 2017-07-28 07:16:35 -06:00
Giorgio Groß
b55ec110f2 Add driver for LTC4151 current and voltage monitor 2017-07-28 13:05:56 +02:00
Juha Niskanen
32610b53f4 drivers/{sensors,usbmisc}: Fix uninitialized I2C frequency 2017-06-01 06:19:54 -06:00