drivrs/sensors: Make a few other configuration settings consistent with the (undocumented) standard.

This commit is contained in:
Gregory Nutt 2017-08-24 09:45:46 -06:00
parent 5dd25bbfde
commit 7f4af7b690
16 changed files with 40 additions and 37 deletions

View File

@ -60,11 +60,11 @@ ifeq ($(CONFIG_STM32_OTGFS),y)
CSRCS += stm32_usb.c
endif
ifeq ($(CONFIG_BH1750FVI),y)
ifeq ($(CONFIG_SENSORS_BH1750FVI),y)
CSRCS += stm32_bh1750fvi.c
endif
ifeq ($(CONFIG_BMP180),y)
ifeq ($(CONFIG_SENSORS_BMP180),y)
CSRCS += stm32_bmp180.c
endif

View File

@ -82,7 +82,7 @@
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BMP180
#ifdef CONFIG_SENSORS_BMP180
stm32_bmp180initialize("/dev/press0");
#endif

View File

@ -49,7 +49,7 @@
#include "stm32_i2c.h"
#include "stm32f4discovery.h"
#if defined(CONFIG_I2C) && defined(CONFIG_BH1750FVI)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_BH1750FVI)
/************************************************************************************
* Pre-processor Definitions
@ -102,4 +102,4 @@ int stm32_bh1750initialize(FAR const char *devpath)
return ret;
}
#endif /* CONFIG_I2C && CONFIG_BH1750FVI && CONFIG_STM32_I2C1 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_BH1750FVI && CONFIG_STM32_I2C1 */

View File

@ -49,7 +49,7 @@
#include "stm32_i2c.h"
#include "stm32f4discovery.h"
#if defined(CONFIG_I2C) && defined(CONFIG_BMP180)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_BMP180)
/************************************************************************************
* Pre-processor Definitions

View File

@ -106,7 +106,7 @@ int stm32_bringup(void)
#endif
int ret = OK;
#ifdef CONFIG_BH1750FVI
#ifdef CONFIG_SENSORS_BH1750FVI
stm32_bh1750initialize("/dev/light0");
#endif

View File

@ -412,7 +412,7 @@ void weak_function stm32_spidev_initialize(void);
*
****************************************************************************/
#ifdef CONFIG_BH1750FVI
#ifdef CONFIG_SENSORS_BH1750FVI
int stm32_bh1750initialize(FAR const char *devpath);
#endif
@ -425,7 +425,7 @@ int stm32_bh1750initialize(FAR const char *devpath);
*
****************************************************************************/
#ifdef CONFIG_BMP180
#ifdef CONFIG_SENSORS_BMP180
int stm32_bmp180initialize(FAR const char *devpath);
#endif

View File

@ -3,7 +3,7 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config AS5048B
config SENSORS_AS5048B
bool "AMS AS5048B Magnetic Rotary Encoder support"
default n
select I2C
@ -11,21 +11,26 @@ config AS5048B
---help---
Enable driver support for the AMS AS5048B magnetic rotary encoder.
config BH1750FVI
config SENSORS_BH1750FVI
bool "Rohm BH1750FVI Ambient Light Sensor support"
default n
select I2C
---help---
Enable driver support for the Rohm BH1750FVI light sensor.
config BMG160
config BH1750FVI_I2C_FREQUENCY
int "BH1750FVI I2C frequency"
default 400000
depends on SENSORS_BH1750FVI
config SENSORS_BMG160
bool "Bosch BMG160 Gyroscope Sensor support"
default n
select SPI
---help---
Enable driver support for the Bosch BMG160 gyroscope sensor.
config BMP180
config SENSORS_BMP180
bool "Bosch BMP180 Barometer Sensor support"
default n
select I2C

View File

@ -49,7 +49,7 @@ endif
ifeq ($(CONFIG_I2C),y)
ifeq ($(CONFIG_AS5048B),y)
ifeq ($(CONFIG_SENSORS_AS5048B),y)
CSRCS += as5048b.c
endif
@ -77,15 +77,15 @@ ifeq ($(CONFIG_ADXL345_I2C),y)
CSRCS += adxl345_i2c.c
endif
ifeq ($(CONFIG_BH1750FVI),y)
ifeq ($(CONFIG_SENSORS_BH1750FVI),y)
CSRCS += bh1750fvi.c
endif
ifeq ($(CONFIG_BMG160),y)
ifeq ($(CONFIG_SENSORS_BMG160),y)
CSRCS += bmg160.c
endif
ifeq ($(CONFIG_BMP180),y)
ifeq ($(CONFIG_SENSORS_BMP180),y)
CSRCS += bmp180.c
endif

View File

@ -52,7 +52,7 @@
#include <nuttx/i2c/i2c_master.h>
#include <nuttx/sensors/as5048b.h>
#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_AS5048B)
#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_SENSORS_AS5048B)
/****************************************************************************
* Private Types
@ -619,4 +619,4 @@ FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c,
return &priv->lower;
}
#endif /* CONFIG_I2C && CONFIG_QENCODER && CONFIG_AS5048B */
#endif /* CONFIG_I2C && CONFIG_QENCODER && CONFIG_SENSORS_AS5048B */

View File

@ -53,7 +53,7 @@
#include <nuttx/sensors/bh1750fvi.h>
#include <nuttx/random.h>
#if defined(CONFIG_I2C) && defined(CONFIG_BH1750FVI)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_BH1750FVI)
/****************************************************************************
* Pre-process Definitions
@ -459,4 +459,4 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
return ret;
}
#endif /* CONFIG_I2C && CONFIG_BH1750FVI */
#endif /* CONFIG_I2C && CONFIG_SENSORS_BH1750FVI */

View File

@ -53,7 +53,7 @@
#include <nuttx/sensors/bmg160.h>
#include <nuttx/random.h>
#if defined(CONFIG_SPI) && defined(CONFIG_BMG160)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_BMG160)
/****************************************************************************
* Private
@ -597,4 +597,4 @@ int bmg160_register(FAR const char *devpath, FAR struct spi_dev_s *spi,
return OK;
}
#endif /* CONFIG_SPI && CONFIG_BMG160 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_BMG160 */

View File

@ -55,7 +55,7 @@
#include <nuttx/sensors/bmp180.h>
#include <nuttx/random.h>
#if defined(CONFIG_I2C) && defined(CONFIG_BMP180)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_BMP180)
/****************************************************************************
* Pre-processor Definitions
@ -642,4 +642,4 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c)
return ret;
}
#endif /* CONFIG_I2C && CONFIG_BMP180 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_BMP180 */

View File

@ -43,7 +43,7 @@
#include <nuttx/config.h>
#include <nuttx/sensors/qencoder.h>
#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_AS5048B)
#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_SENSORS_AS5048B)
/****************************************************************************
* Pre-processor Definitions
@ -53,7 +53,7 @@
*
* CONFIG_I2C
* Enables support for I2C drivers
* CONFIG_AS5048B
* CONFIG_SENSORS_AS5048B
* Enables support for the AS5048B driver
*/
@ -137,5 +137,5 @@ FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c,
}
#endif
#endif /* CONFIG_I2C && CONFIG_QENCODER && CONFIG_AS5048B */
#endif /* CONFIG_I2C && CONFIG_QENCODER && CONFIG_SENSORS_AS5048B */
#endif /* __INCLUDE_NUTTX_SENSORS_AS5048B */

View File

@ -45,7 +45,7 @@
#include <nuttx/irq.h>
#include <nuttx/sensors/ioctl.h>
#if defined(CONFIG_BH1750FVI)
#if defined(CONFIG_SENSORS_BH1750FVI)
/****************************************************************************
* Pre-processor Definitions
@ -110,5 +110,5 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
}
#endif
#endif /* CONFIG_BH1750FVI */
#endif /* CONFIG_SENSORS_BH1750FVI */
#endif /* __INCLUDE_NUTTX_SENSORS_BH1750FVI_H */

View File

@ -46,7 +46,7 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
#if defined(CONFIG_SPI) && defined(CONFIG_BMG160)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_BMG160)
/********************************************************************************************
* Pre-processor Definitions
@ -436,5 +436,5 @@ int bmg160_register(FAR const char *devpath, FAR struct spi_dev_s *spi,
}
#endif
#endif /* CONFIG_SPI && CONFIG_BMG160 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_BMG160 */
#endif /* __INCLUDE_NUTTX_SENSORS_BMG160_H */

View File

@ -38,7 +38,7 @@
#include <nuttx/config.h>
#if defined(CONFIG_I2C) && defined(CONFIG_BMP180)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_BMP180)
/********************************************************************************************
* Pre-processor Definitions
@ -49,10 +49,8 @@
/* Configuration ****************************************************************************/
/* Prerequisites:
*
* CONFIG_BMP180
* CONFIG_SENSORS_BMP180
* Enables support for the BMP180 driver
* CONFIG_BMP180_REGDEBUG
* Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES.
*/
/****************************************************************************
@ -96,5 +94,5 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c);
}
#endif
#endif /* CONFIG_I2C && CONFIG_BMP180 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_BMP180 */
#endif /* __INCLUDE_NUTTX_SENSORS_BMP180_H */