drivers/sensors: Fix more naming of configurations to be compliant for two more drivers. Still a few more to go.

This commit is contained in:
Gregory Nutt 2017-08-24 10:10:00 -06:00
parent 269107afc8
commit 1f023fa31a
30 changed files with 67 additions and 67 deletions

View File

@ -496,8 +496,8 @@ Temperature Sensor
CONFIG_I2C=y
Drivers -> Sensors
CONFIG_LM75=y
CONFIG_I2C_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_LM75_I2C=y
Applications -> NSH Library
CONFIG_NSH_ARCHINIT=y

View File

@ -275,7 +275,7 @@ void tiva_boardinitialize(void);
*
************************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_TIVA_I2C6)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_TIVA_I2C6)
int tiva_tmp100_initialize(FAR const char *devpath);
#endif

View File

@ -23,7 +23,7 @@ CONFIG_I2CTOOL_MAXBUS=6
CONFIG_I2CTOOL_MINBUS=6
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBM=y
CONFIG_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NET_BROADCAST=y

View File

@ -21,7 +21,7 @@ CONFIG_I2CTOOL_MAXBUS=6
CONFIG_I2CTOOL_MINBUS=6
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBM=y
CONFIG_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NET_ARP_IPIN=y

View File

@ -60,7 +60,7 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y)
CSRCS += tm4c_appinit.c
endif
ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
ifeq ($(CONFIG_TIVA_I2C6),y)
CSRCS += tm4c_tmp100.c
endif

View File

@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_TIVA_I2C6)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_TIVA_I2C6)
# define HAVE_TMP100
#endif

View File

@ -47,7 +47,7 @@
#include "tiva_i2c.h"
#include "dk-tm4c129x.h"
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && \
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && \
defined(CONFIG_TIVA_I2C6)
/****************************************************************************
@ -100,4 +100,4 @@ int tiva_tmp100_initialize(FAR const char *devpath)
return ret;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 && CONFIG_TIVA_I2C6 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C && CONFIG_TIVA_I2C6 */

View File

@ -346,8 +346,8 @@ Temperature Sensor
following to the NuttX configuration file
Drivers -> Sensors
CONFIG_LM75=y
CONFIG_I2C_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_LM75_I2C=y
Then you can implement logic like the following to use the temperature
sensor:

View File

@ -277,7 +277,7 @@ void stm3210e_lcdclear(uint16_t color);
*
************************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)
int stm32_lm75initialize(FAR const char *devpath);
#endif
@ -296,7 +296,7 @@ int stm32_lm75initialize(FAR const char *devpath);
*
************************************************************************************/
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)
int stm32_lm75attach(xcpt_t irqhandler, void *arg);
#endif

View File

@ -60,7 +60,7 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
CSRCS += stm32_composite.c
endif
ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
CSRCS += stm32_lm75.c
endif

View File

@ -48,7 +48,7 @@
#include "stm32_i2c.h"
#include "stm3210e-eval.h"
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)
/************************************************************************************
* Public Functions
@ -119,4 +119,4 @@ int stm32_lm75attach(xcpt_t irqhandler, void *arg)
return OK;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 && CONFIG_STM32_I2C1 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C && CONFIG_STM32_I2C1 */

View File

@ -68,11 +68,11 @@ ifeq ($(CONFIG_SENSORS_BMP180),y)
CSRCS += stm32_bmp180.c
endif
ifeq ($(CONFIG_MAX31855),y)
ifeq ($(CONFIG_SENSORS_MAX31855),y)
CSRCS += stm32_max31855.c
endif
ifeq ($(CONFIG_MAX6675),y)
ifeq ($(CONFIG_SENSORS_MAX6675),y)
CSRCS += stm32_max6675.c
endif

View File

@ -264,11 +264,11 @@ int stm32_bringup(void)
}
#endif
#ifdef CONFIG_MAX31855
#ifdef CONFIG_SENSORS_MAX31855
ret = stm32_max31855initialize("/dev/temp0");
#endif
#ifdef CONFIG_MAX6675
#ifdef CONFIG_SENSORS_MAX6675
ret = stm32_max6675initialize("/dev/temp0");
#endif

View File

@ -49,7 +49,7 @@
#include "stm32_spi.h"
#include "stm32f4discovery.h"
#if defined(CONFIG_SPI) && defined(CONFIG_MAX31855) && defined(CONFIG_STM32_SPI2)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX31855) && defined(CONFIG_STM32_SPI2)
/************************************************************************************
* Pre-processor Definitions
@ -98,4 +98,4 @@ int stm32_max31855initialize(FAR const char *devpath)
return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX31855 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX31855 */

View File

@ -49,7 +49,7 @@
#include "stm32_spi.h"
#include "stm32f4discovery.h"
#if defined(CONFIG_SPI) && defined(CONFIG_MAX6675) && defined(CONFIG_STM32_SPI2)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX6675) && defined(CONFIG_STM32_SPI2)
/************************************************************************************
* Pre-processor Definitions
@ -98,4 +98,4 @@ int stm32_max6675initialize(FAR const char *devpath)
return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX6675 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX6675 */

View File

@ -72,10 +72,10 @@ void weak_function stm32_spidev_initialize(void)
#ifdef CONFIG_STM32_SPI1
(void)stm32_configgpio(GPIO_CS_MEMS); /* MEMS chip select */
#endif
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_MAX31855)
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_SENSORS_MAX31855)
(void)stm32_configgpio(GPIO_MAX31855_CS); /* MAX31855 chip select */
#endif
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_MAX6675)
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_SENSORS_MAX6675)
(void)stm32_configgpio(GPIO_MAX6675_CS); /* MAX6675 chip select */
#endif
#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \
@ -144,13 +144,13 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#if defined(CONFIG_MAX31855)
#if defined(CONFIG_SENSORS_MAX31855)
if (devid == SPIDEV_TEMPERATURE(0))
{
stm32_gpiowrite(GPIO_MAX31855_CS, !selected);
}
#endif
#if defined(CONFIG_MAX6675)
#if defined(CONFIG_SENSORS_MAX6675)
if (devid == SPIDEV_TEMPERATURE(0))
{
stm32_gpiowrite(GPIO_MAX6675_CS, !selected);

View File

@ -638,7 +638,7 @@ int stm32_zerocross_initialize(void);
*
****************************************************************************/
#ifdef CONFIG_MAX6675
#ifdef CONFIG_SENSORS_MAX6675
int stm32_max6675initialize(FAR const char *devpath);
#endif

View File

@ -302,36 +302,36 @@ config ADXL345_REGDEBUG
endif # SENSORS_ADXL345
config MAX31855
config SENSORS_MAX31855
bool "Maxim MAX31855 Driver"
default n
select SPI
---help---
Enables support for the MAX31855 driver
config MAX6675
config SENSORS_MAX6675
bool "Maxim MAX6675 Driver"
default n
select SPI
---help---
Enables support for the MAX6675 driver
config I2C_LM75
bool
default y if LM75
config LIS3MDL
config SENSORS_LIS3MDL
bool "STMicro LIS3MDL 3-Axis magnetometer support"
default n
select SPI
---help---
Enable driver support for the STMicro LIS3MDL 3-axis magnetometer.
config LM75
config LM75_I2C
bool
default y if LM75
config SENSORS_LM75
bool "STMicro LM-75 Temperature Sensor support"
default n
select I2C
select I2C_LM75
select LM75_I2C
---help---
Enable driver support for the STMicro LM-75 temperature sensor.
This should also work with compatible temperature sensors such as
@ -341,7 +341,7 @@ config LM75_I2C_FREQUENCY
int "LM75 I2C frequency"
default 100000
range 1 100000
depends on I2C_LM75
depends on LM75_I2C
config LM92
bool "TI LM92 Temperature Sensor support"

View File

@ -93,11 +93,11 @@ ifeq ($(CONFIG_SENSORS_HTS221),y)
CSRCS += hts221.c
endif
ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
CSRCS += lm75.c
endif
ifeq ($(CONFIG_LM92),y)
ifeq ($(CONFIG_SENSORS_LM92),y)
CSRCS += lm92.c
endif
@ -134,11 +134,11 @@ ifeq ($(CONFIG_LIS3DSH),y)
CSRCS += lis3dsh.c
endif
ifeq ($(CONFIG_MAX31855),y)
ifeq ($(CONFIG_SENSORS_MAX31855),y)
CSRCS += max31855.c
endif
ifeq ($(CONFIG_MAX6675),y)
ifeq ($(CONFIG_SENSORS_MAX6675),y)
CSRCS += max6675.c
endif
@ -146,7 +146,7 @@ ifeq ($(CONFIG_MPL115A),y)
CSRCS += mpl115a.c
endif
ifeq ($(CONFIG_LIS3MDL),y)
ifeq ($(CONFIG_SENSORS_LIS3MDL),y)
CSRCS += lis3mdl.c
endif

View File

@ -52,7 +52,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/sensors/lis3mdl.h>
#if defined(CONFIG_SPI) && defined(CONFIG_LIS3MDL)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_LIS3MDL)
/****************************************************************************
* Private
@ -638,4 +638,4 @@ int lis3mdl_register(FAR const char *devpath, FAR struct spi_dev_s *spi,
return OK;
}
#endif /* CONFIG_SPI && CONFIG_LIS3MDL */
#endif /* CONFIG_SPI && CONFIG_SENSORS_LIS3MDL */

View File

@ -51,7 +51,7 @@
#include <nuttx/sensors/lm75.h>
#include <nuttx/random.h>
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C)
/****************************************************************************
* Pre-processor Definitions
@ -604,4 +604,4 @@ int lm75_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, uint8_t
return ret;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C */

View File

@ -53,7 +53,7 @@
#include <nuttx/sensors/lm92.h>
#include <nuttx/random.h>
#if defined(CONFIG_I2C) && defined(CONFIG_LM92)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_LM92)
/****************************************************************************
* Pre-processor Definitions
@ -694,4 +694,4 @@ int lm92_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
return ret;
}
#endif /* CONFIG_I2C && CONFIG_LM92 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_LM92 */

View File

@ -56,7 +56,7 @@
#include <nuttx/sensors/max31855.h>
#include <nuttx/random.h>
#if defined(CONFIG_SPI) && defined(CONFIG_MAX31855)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX31855)
/****************************************************************************
* Pre-processor Definitions
@ -331,4 +331,4 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi)
return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX31855 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX31855 */

View File

@ -56,7 +56,7 @@
#include <nuttx/sensors/max6675.h>
#include <nuttx/random.h>
#if defined(CONFIG_SPI) && defined(CONFIG_MAX6675)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX6675)
/****************************************************************************
* Pre-processor Definitions
@ -308,4 +308,4 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi)
return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX6675 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX6675 */

View File

@ -374,4 +374,4 @@ int mcp9844_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
return ret;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C */

View File

@ -45,7 +45,7 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
#if defined(CONFIG_SPI) && defined(CONFIG_LIS3MDL)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_LIS3MDL)
/****************************************************************************
* Pre-processor Definitions
@ -176,5 +176,5 @@ int lis3mdl_register(FAR const char *devpath, FAR struct spi_dev_s *spi,
}
#endif
#endif /* CONFIG_SPI && CONFIG_LIS3MDL */
#endif /* CONFIG_SPI && CONFIG_SENSORS_LIS3MDL */
#endif /* __INCLUDE_NUTTX_SENSORS_LIS3MDL_H */

View File

@ -43,14 +43,14 @@
#include <nuttx/config.h>
#include <nuttx/sensors/ioctl.h>
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************
* CONFIG_I2C - Enables support for I2C drivers
* CONFIG_I2C_LM75 - Enables support for the LM-75 driver
* CONFIG_LM75_I2C - Enables support for the LM-75 driver
*/
#define CONFIG_LM75_BASEADDR 0x48
@ -126,5 +126,5 @@ int lm75_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
}
#endif
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C */
#endif /* __INCLUDE_NUTTX_SENSORS_LM75_H */

View File

@ -45,14 +45,14 @@
#include <nuttx/config.h>
#include <nuttx/sensors/ioctl.h>
#if defined(CONFIG_I2C) && defined(CONFIG_LM92)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_LM92)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************
* CONFIG_I2C - Enables support for I2C drivers
* CONFIG_LM92 - Enables support for the LM92 driver
* CONFIG_SENSORS_LM92 - Enables support for the LM92 driver
*/
#define CONFIG_LM92_BASEADDR 0x48
@ -129,5 +129,5 @@ int lm92_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
}
#endif
#endif /* CONFIG_I2C && CONFIG_LM92 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_LM92 */
#endif /* __INCLUDE_NUTTX_SENSORS_LM92_H */

View File

@ -43,7 +43,7 @@
#include <nuttx/config.h>
#include <nuttx/irq.h>
#if defined(CONFIG_MAX31855)
#if defined(CONFIG_SENSORS_MAX31855)
/****************************************************************************
* Pre-processor Definitions
@ -94,5 +94,5 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi);
}
#endif
#endif /* CONFIG_MAX31855 */
#endif /* CONFIG_SENSORS_MAX31855 */
#endif /* __INCLUDE_NUTTX_SENSORS_MAX31855_H */

View File

@ -43,7 +43,7 @@
#include <nuttx/config.h>
#include <nuttx/irq.h>
#if defined(CONFIG_MAX6675)
#if defined(CONFIG_SENSORS_MAX6675)
/****************************************************************************
* Pre-processor Definitions
@ -94,5 +94,5 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi);
}
#endif
#endif /* CONFIG_MAX6675 */
#endif /* CONFIG_SENSORS_MAX6675 */
#endif /* __INCLUDE_NUTTX_SENSORS_MAX6675_H */