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.
This commit is contained in:
parent
8432164e52
commit
235d580984
@ -23,6 +23,13 @@ config SENSORS_AS5048B
|
||||
---help---
|
||||
Enable driver support for the AMS AS5048B magnetic rotary encoder.
|
||||
|
||||
config SENSOR_BH1749NUC
|
||||
bool "Rohm BH1749NUC Color Sensor"
|
||||
default n
|
||||
select I2C
|
||||
---help---
|
||||
Enable driver for BH1749NUC color sensor.
|
||||
|
||||
config SENSORS_BH1750FVI
|
||||
bool "Rohm BH1750FVI Ambient Light Sensor support"
|
||||
default n
|
||||
@ -35,6 +42,13 @@ config BH1750FVI_I2C_FREQUENCY
|
||||
default 400000
|
||||
depends on SENSORS_BH1750FVI
|
||||
|
||||
config SENSOR_BH1790GLC
|
||||
bool "Rohm BH1790GLC Heartrate sensor"
|
||||
default n
|
||||
select I2C
|
||||
---help---
|
||||
Enable driver for BH1790GLC Heartrate sensor.
|
||||
|
||||
config SENSORS_BMG160
|
||||
bool "Bosch BMG160 Gyroscope Sensor support"
|
||||
default n
|
||||
@ -126,54 +140,6 @@ config SENSOR_KX224
|
||||
---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
|
||||
|
@ -49,22 +49,12 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_I2C),y)
|
||||
|
||||
ifeq ($(CONFIG_KX224),y)
|
||||
ifeq ($(CONFIG_KX224_SCU),y)
|
||||
CSRCS += kx224_scu.c
|
||||
endif
|
||||
ifeq ($(CONFIG_SENSOR_BH1749NUC),y)
|
||||
CSRCS += bh1749nuc.c
|
||||
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
|
||||
ifeq ($(CONFIG_SENSOR_BH1790GLC),y)
|
||||
CSRCS += bh1790glc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSORS_APDS9960),y)
|
||||
@ -79,6 +69,10 @@ ifeq ($(CONFIG_SENSORS_KXTJ9),y)
|
||||
CSRCS += kxtj9.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_KX224),y)
|
||||
CSRCS += kx224.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSORS_LIS2DH),y)
|
||||
CSRCS += lis2dh.c
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* drivers/sensors/bh1749nuc_scu.c
|
||||
* drivers/sensors/bh1749nuc.c
|
||||
*
|
||||
* Copyright (C) 2018 Sony Corporation
|
||||
*
|
||||
@ -36,7 +36,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -50,9 +50,8 @@
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/sensors/bh1749nuc.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/cxd56_scu.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_BH1749NUC) && defined(CONFIG_CXD56_SCU)
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_BH1749NUC)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -525,4 +524,4 @@ int bh1749nuc_register(FAR const char *devpath, int minor,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C && CONFIG_BH1749NUC && CONFIG_CXD56_SCU */
|
||||
#endif /* CONFIG_I2C && CONFIG_BH1749NUC */
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* drivers/sensors/bh1790glc_scu.c
|
||||
* drivers/sensors/bh1790glc.c
|
||||
*
|
||||
* Copyright (C) 2016 Sony Corporation
|
||||
*
|
||||
@ -36,7 +36,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -50,9 +50,8 @@
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/sensors/bh1790glc.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/cxd56_scu.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_BH1790GLC) && defined(CONFIG_CXD56_SCU)
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_BH1790GLC)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -516,4 +515,4 @@ int bh1790glc_register(FAR const char *devpath, int minor,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C && CONFIG_BH1790GLC && CONFIG_CXD56_SCU */
|
||||
#endif /* CONFIG_I2C && CONFIG_BH1790GLC */
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* drivers/sensors/kx224_scu.c
|
||||
* drivers/sensors/kx224.c
|
||||
*
|
||||
* Copyright (C) 2016 Sony Corporation
|
||||
*
|
||||
@ -36,7 +36,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -50,9 +50,8 @@
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/sensors/kx224.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/cxd56_scu.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_KX224) && defined(CONFIG_CXD56_SCU)
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_KX224)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -528,4 +527,4 @@ int kx224_register(FAR const char *devpath, int minor,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C && CONFIG_KX224 && CONFIG_CXD56_SCU */
|
||||
#endif /* CONFIG_I2C && CONFIG_KX224 */
|
@ -35,7 +35,7 @@
|
||||
#ifndef __INCLUDE_NUTTX_SENSORS_BH1749NUC_H
|
||||
#define __INCLUDE_NUTTX_SENSORS_BH1749NUC_H
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_BH1749NUC)
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#ifndef __INCLUDE_NUTTX_SENSORS_BH1790GLC_H
|
||||
#define __INCLUDE_NUTTX_SENSORS_BH1790GLC_H
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_BH1790GLC)
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#ifndef __INCLUDE_NUTTX_SENSORS_KX224_H
|
||||
#define __INCLUDE_NUTTX_SENSORS_KX224_H
|
||||
|
||||
#include <sdk/config.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_KX224)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user