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>
This commit is contained in:
Juho Valkama
2018-07-10 12:38:25 +00:00
committed by GregoryN
parent 8271f72b72
commit 0eff3d530f
9 changed files with 2002 additions and 2 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ README
- NuttX Configuration Tool
- Finding Selections in the Configuration Menus
- Reveal Hidden Configuration Options
- Make Sure that You on on the Right Platform
- Make Sure that You are on the Right Platform
- Comparing Two Configurations
- Making defconfig Files
- Incompatibilities with Older Configurations
@@ -1556,7 +1556,7 @@ Strange Path Problems
When you install some toolchains (such as Yargarto or CodeSourcery tools),
they may modify your PATH variable to include a path to their binaries.
At that location, they make have GNUWin32 versions of the tools. So you
At that location, they may have GNUWin32 versions of the tools. So you
might actually be using a version of make that does not understand Cygwin
paths.
+55
View File
@@ -119,6 +119,61 @@ config KXTJ9_I2C_BUS_SPEED
endif # SENSORS_KXTJ9
config SENSOR_KX224
bool "Kionix KX224 Acceleration Sensor"
default n
select I2C
---help---
Enable driver for the Kionix KX224 acceleration sensor.
if SENSOR_KX224
config SENSOR_KX224_SCU
bool "SCU Sequencer"
default y
depends on CXD56_SCU
---help---
Use the sensor control unit (SCU) sequencer.
Support only driver with the sensor control unit (SCU) sequencer.
endif # SENSOR_KX224
config SENSOR_BH1749NUC
bool "Rohm BH1749NUC Color Sensor"
default n
select I2C
---help---
Enable driver for BH1749NUC color sensor.
if SENSOR_BH1749NUC
config SENSOR_BH1749NUC_SCU
bool "SCU Sequencer"
default y
depends on CXD56_SCU
---help---
Use the sensor control unit (SCU) sequencer.
endif # SENSOR_BH1749NUC
config SENSOR_BH1790GLC
bool "Rohm BH1790GLC Heartrate sensor"
default n
select I2C
---help---
Enable driver for BH1790GLC Heartrate sensor.
if SENSOR_BH1790GLC
config SENSOR_BH1790GLC_SCU
bool "SCU Sequencer"
default y
depends on CXD56_SCU
---help---
Use the sensor control unit (SCU) sequencer.
endif # SENSOR_BH1790GLC
config SENSORS_LIS2DH
bool "STMicro LIS2DH device support"
default n
+18
View File
@@ -49,6 +49,24 @@ endif
ifeq ($(CONFIG_I2C),y)
ifeq ($(CONFIG_KX224),y)
ifeq ($(CONFIG_KX224_SCU),y)
CSRCS += kx224_scu.c
endif
endif
ifeq ($(CONFIG_BH1749NUC),y)
ifeq ($(CONFIG_BH1749NUC_SCU),y)
CSRCS += bh1749nuc_scu.c
endif
endif
ifeq ($(CONFIG_BH1790GLC),y)
ifeq ($(CONFIG_BH1790GLC_SCU),y)
CSRCS += bh1790glc_scu.c
endif
endif
ifeq ($(CONFIG_SENSORS_APDS9960),y)
CSRCS += apds9960.c
endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+116
View File
@@ -0,0 +1,116 @@
/****************************************************************************
* bsp/include/nuttx/sensors/bh1749nuc.h
*
* Copyright (C) 2016 Sony Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor Sony nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_BH1749NUC_H
#define __INCLUDE_NUTTX_SENSORS_BH1749NUC_H
#include <sdk/config.h>
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_BH1749NUC)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************
/* Prerequisites:
*
* CONFIG_SENSOR_BH1749NUC
* Enables support for the BH1749NUC driver
*/
/****************************************************************************
* Public Types
****************************************************************************/
struct i2c_master_s;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Name: bh1749nuc_init
*
* Description:
* Initialize BH1749NUC color sensor device
*
* Input Parameters:
* i2c - An instance of the I2C interface to use to communicate with
* BH1749NUC
* port - I2C port (0 or 1)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int bh1749nuc_init(FAR struct i2c_master_s *i2c, int port);
/****************************************************************************
* Name: bh1749nuc_register
*
* Description:
* Register the BH1749NUC character device as 'devpath'
*
* Input Parameters:
* devpath - The full path to the driver to register. E.g., "/dev/color0"
* minor - minor device number
* i2c - An instance of the I2C interface to use to communicate with
* BH1749NUC
* port - I2C port (0 or 1)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int bh1749nuc_register(FAR const char *devpath, int minor,
FAR struct i2c_master_s *i2c, int port);
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_I2C && CONFIG_SENSOR_BH1749NUC */
#endif /* __INCLUDE_NUTTX_SENSORS_BH1749NUC_H */
+116
View File
@@ -0,0 +1,116 @@
/****************************************************************************
* bsp/include/nuttx/sensors/bh1790glc.h
*
* Copyright (C) 2016 Sony Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor Sony nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_BH1790GLC_H
#define __INCLUDE_NUTTX_SENSORS_BH1790GLC_H
#include <sdk/config.h>
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_BH1790GLC)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************
/* Prerequisites:
*
* CONFIG_SENSOR_BH1790GLC
* Enables support for the BH1790GLC driver
*/
/****************************************************************************
* Public Types
****************************************************************************/
struct i2c_master_s;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Name: bh1790glc_init
*
* Description:
* Initialize BH1790GLC color sensor device
*
* Input Parameters:
* i2c - An instance of the I2C interface to use to communicate with
* BH1790GLC
* port - I2C port (0 or 1)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int bh1790glc_init(FAR struct i2c_master_s *i2c, int port);
/****************************************************************************
* Name: bh1790glc_register
*
* Description:
* Register the BH1790GLC character device as 'devpath'
*
* Input Parameters:
* devpath - The full path to the driver to register. E.g., "/dev/color0"
* minor - minor device number
* i2c - An instance of the I2C interface to use to communicate with
* BH1790GLC
* port - I2C port (0 or 1)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int bh1790glc_register(FAR const char *devpath, int minor,
FAR struct i2c_master_s *i2c, int port);
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_I2C && CONFIG_SENSOR_BH1790GLC */
#endif /* __INCLUDE_NUTTX_SENSORS_BH1790GLC_H */
+117
View File
@@ -0,0 +1,117 @@
/****************************************************************************
* bsp/include/nuttx/sensors/kx224.h
*
* Copyright (C) 2016 Sony Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor Sony nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_KX224_H
#define __INCLUDE_NUTTX_SENSORS_KX224_H
#include <sdk/config.h>
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_KX224)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************
/* Prerequisites:
*
* CONFIG_SENSOR_KX224
* Enables support for the KX224 driver
*/
/****************************************************************************
* Public Types
****************************************************************************/
struct i2c_master_s;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Name: kx224_init
*
* Description:
* Initialize KX224 accelerometer device
*
* Input Parameters:
* i2c - An instance of the I2C interface to use to communicate with
* KX224
* port - I2C port (0 or 1)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int kx224_init(FAR struct i2c_master_s *i2c, int port);
/****************************************************************************
* Name: kx224_register
*
* Description:
* Register the KX224 character device as 'devpath'
*
* Input Parameters:
* devpath - The full path to the driver to register. E.g., "/dev/accel0"
* minor - minor device number
* i2c - An instance of the I2C interface to use to communicate with
* KX224
* port - I2C port (0 or 1)
* seq - Sequencer instance
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
int kx224_register(FAR const char *devpath, int minor,
FAR struct i2c_master_s *i2c, int port);
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_I2C && CONFIG_SENSOR_KX224 */
#endif /* __INCLUDE_NUTTX_SENSORS_KX224_H */