diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index e7817c8c532..512872a8974 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -249,7 +249,7 @@ ifeq ($(CONFIG_PWM),y) CHIP_CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CHIP_CSRCS += stm32_qencoder.c endif diff --git a/arch/arm/src/stm32/stm32_qencoder.c b/arch/arm/src/stm32/stm32_qencoder.c index 09ed7669a0a..5bc98ad3229 100644 --- a/arch/arm/src/stm32/stm32_qencoder.c +++ b/arch/arm/src/stm32/stm32_qencoder.c @@ -60,7 +60,7 @@ #include "stm32_tim.h" #include "stm32_qencoder.h" -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /************************************************************************************ * Pre-processor Definitions @@ -1219,4 +1219,4 @@ int stm32_qeinitialize(FAR const char *devpath, int tim) return OK; } -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ diff --git a/arch/arm/src/stm32/stm32_qencoder.h b/arch/arm/src/stm32/stm32_qencoder.h index 5effa7163d7..bea28531b67 100644 --- a/arch/arm/src/stm32/stm32_qencoder.h +++ b/arch/arm/src/stm32/stm32_qencoder.h @@ -44,7 +44,7 @@ #include "chip.h" -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /************************************************************************************ * Included Files @@ -137,6 +137,6 @@ int stm32_qeinitialize(FAR const char *devpath, int tim); -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ #endif /* __ARCH_ARM_SRC_STM32_STM32_QENCODER_H */ diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs index 341f62e33d5..271a2ff6293 100644 --- a/arch/arm/src/stm32l4/Make.defs +++ b/arch/arm/src/stm32l4/Make.defs @@ -208,7 +208,7 @@ ifeq ($(CONFIG_PWM),y) CHIP_CSRCS += stm32l4_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CHIP_CSRCS += stm32l4_qencoder.c endif diff --git a/arch/arm/src/stm32l4/stm32l4_qencoder.c b/arch/arm/src/stm32l4/stm32l4_qencoder.c index 7c65b95d5a9..9f8a20fc9f8 100644 --- a/arch/arm/src/stm32l4/stm32l4_qencoder.c +++ b/arch/arm/src/stm32l4/stm32l4_qencoder.c @@ -60,7 +60,7 @@ #include "stm32l4_tim.h" #include "stm32l4_qencoder.h" -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /************************************************************************************ * Pre-processor Definitions @@ -1154,4 +1154,4 @@ int stm32l4_qeinitialize(FAR const char *devpath, int tim) return OK; } -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ diff --git a/arch/arm/src/stm32l4/stm32l4_qencoder.h b/arch/arm/src/stm32l4/stm32l4_qencoder.h index fca0b88b8bd..7fccca772b3 100644 --- a/arch/arm/src/stm32l4/stm32l4_qencoder.h +++ b/arch/arm/src/stm32l4/stm32l4_qencoder.h @@ -44,7 +44,7 @@ #include "chip.h" -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /************************************************************************************ * Included Files @@ -136,6 +136,6 @@ int stm32l4_qeinitialize(FAR const char *devpath, int tim); -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ #endif /* __ARCH_ARM_SRC_STM32L4_STM32L4_QENCODER_H */ diff --git a/configs/freedom-kl25z/src/Makefile b/configs/freedom-kl25z/src/Makefile index 37f83bc1ffb..843155c3bca 100644 --- a/configs/freedom-kl25z/src/Makefile +++ b/configs/freedom-kl25z/src/Makefile @@ -74,7 +74,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += kl_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += kl_qencoder.c endif diff --git a/configs/mikroe-stm32f4/src/Makefile b/configs/mikroe-stm32f4/src/Makefile index 3fba8bdc715..aa62ed68c53 100644 --- a/configs/mikroe-stm32f4/src/Makefile +++ b/configs/mikroe-stm32f4/src/Makefile @@ -54,7 +54,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/mikroe-stm32f4/src/mikroe-stm32f4.h b/configs/mikroe-stm32f4/src/mikroe-stm32f4.h index be7b4edc17d..18e98d1ff64 100644 --- a/configs/mikroe-stm32f4/src/mikroe-stm32f4.h +++ b/configs/mikroe-stm32f4/src/mikroe-stm32f4.h @@ -260,7 +260,7 @@ int stm32_pwm_setup(void); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index b0fee207c24..134f819fc4c 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -373,7 +373,7 @@ int board_app_initialize(uintptr_t arg) #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_MIKROE_QETIMER); diff --git a/configs/nucleo-f4x1re/src/Makefile b/configs/nucleo-f4x1re/src/Makefile index 7778dd7f001..0636f64f5ce 100644 --- a/configs/nucleo-f4x1re/src/Makefile +++ b/configs/nucleo-f4x1re/src/Makefile @@ -62,7 +62,7 @@ CSRCS += stm32_ajoystick.c endif endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/nucleo-f4x1re/src/nucleo-f4x1re.h b/configs/nucleo-f4x1re/src/nucleo-f4x1re.h index c3d1a62ea05..88a7cf44409 100644 --- a/configs/nucleo-f4x1re/src/nucleo-f4x1re.h +++ b/configs/nucleo-f4x1re/src/nucleo-f4x1re.h @@ -328,7 +328,7 @@ int stm32_adc_setup(void); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/configs/nucleo-f4x1re/src/stm32_appinit.c b/configs/nucleo-f4x1re/src/stm32_appinit.c index e82a0ef32b8..05b0c54880b 100644 --- a/configs/nucleo-f4x1re/src/stm32_appinit.c +++ b/configs/nucleo-f4x1re/src/stm32_appinit.c @@ -143,7 +143,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_F401RE_QETIMER); diff --git a/configs/nucleo-l432kc/src/Makefile b/configs/nucleo-l432kc/src/Makefile index fe944ec4437..35d3560ee78 100644 --- a/configs/nucleo-l432kc/src/Makefile +++ b/configs/nucleo-l432kc/src/Makefile @@ -52,7 +52,7 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/nucleo-l432kc/src/nucleo-l432kc.h b/configs/nucleo-l432kc/src/nucleo-l432kc.h index 7b6b2194d6d..a9ce4bee647 100644 --- a/configs/nucleo-l432kc/src/nucleo-l432kc.h +++ b/configs/nucleo-l432kc/src/nucleo-l432kc.h @@ -182,7 +182,7 @@ int board_timer_driver_initialize(FAR const char *devpath, int timer); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32l4_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/configs/nucleo-l432kc/src/stm32_appinit.c b/configs/nucleo-l432kc/src/stm32_appinit.c index 34d703372ef..0422e0cf20c 100644 --- a/configs/nucleo-l432kc/src/stm32_appinit.c +++ b/configs/nucleo-l432kc/src/stm32_appinit.c @@ -112,7 +112,7 @@ int board_app_initialize(uintptr_t arg) #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int index; char buf[9]; #endif @@ -223,7 +223,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ diff --git a/configs/nucleo-l476rg/src/Makefile b/configs/nucleo-l476rg/src/Makefile index 7c908435278..1a5357555d4 100644 --- a/configs/nucleo-l476rg/src/Makefile +++ b/configs/nucleo-l476rg/src/Makefile @@ -62,7 +62,7 @@ CSRCS += stm32_ajoystick.c endif endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/nucleo-l476rg/src/nucleo-l476rg.h b/configs/nucleo-l476rg/src/nucleo-l476rg.h index a6f676da547..b249da652c2 100644 --- a/configs/nucleo-l476rg/src/nucleo-l476rg.h +++ b/configs/nucleo-l476rg/src/nucleo-l476rg.h @@ -383,7 +383,7 @@ int board_timer_driver_initialize(FAR const char *devpath, int timer); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32l4_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 479481417e0..65357c162b8 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -112,7 +112,7 @@ int board_app_initialize(uintptr_t arg) #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int index; char buf[9]; #endif @@ -236,7 +236,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ diff --git a/configs/nutiny-nuc120/src/Makefile b/configs/nutiny-nuc120/src/Makefile index 21840d8a371..5e61cfada65 100644 --- a/configs/nutiny-nuc120/src/Makefile +++ b/configs/nutiny-nuc120/src/Makefile @@ -54,7 +54,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += nuc_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += nuc_qencoder.c endif diff --git a/configs/stm3240g-eval/src/Makefile b/configs/stm3240g-eval/src/Makefile index 28b1b4f702f..92b0a2d6cba 100644 --- a/configs/stm3240g-eval/src/Makefile +++ b/configs/stm3240g-eval/src/Makefile @@ -81,7 +81,7 @@ ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/stm32f0discovery/src/Makefile b/configs/stm32f0discovery/src/Makefile index f1458e3cfb1..585d6dce802 100644 --- a/configs/stm32f0discovery/src/Makefile +++ b/configs/stm32f0discovery/src/Makefile @@ -57,7 +57,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt index 111598ed7f3..7920009787d 100644 --- a/configs/stm32f103-minimum/README.txt +++ b/configs/stm32f103-minimum/README.txt @@ -255,7 +255,7 @@ Quadrature Encoder: - These setting enable support for the common QEncode upper half driver: CONFIG_SENSORS=y - CONFIG_QENCODER=y + CONFIG_SENSORS_QENCODER=y - This is a board setting that selected timer 4 for use with the quadrature encode: diff --git a/configs/stm32f103-minimum/src/Makefile b/configs/stm32f103-minimum/src/Makefile index 360aa0a08eb..58acfc880f0 100644 --- a/configs/stm32f103-minimum/src/Makefile +++ b/configs/stm32f103-minimum/src/Makefile @@ -97,11 +97,11 @@ ifeq ($(CONFIG_LCD_PCD8544),y) CSRCS += stm32_pcd8544.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_VEML6070),y) +ifeq ($(CONFIG_SENSORS_VEML6070),y) CSRCS += stm32_veml6070.c endif diff --git a/configs/stm32f103-minimum/src/stm32_bringup.c b/configs/stm32f103-minimum/src/stm32_bringup.c index 0c5aaa15976..bd5515cb810 100644 --- a/configs/stm32f103-minimum/src/stm32_bringup.c +++ b/configs/stm32f103-minimum/src/stm32_bringup.c @@ -250,7 +250,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F103MINIMUM_QETIMER); @@ -272,7 +272,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_VEML6070 +#ifdef CONFIG_SENSORS_VEML6070 /* Register the UV-A light sensor */ ret = stm32_veml6070initialize("/dev/uvlight0"); diff --git a/configs/stm32f103-minimum/src/stm32_veml6070.c b/configs/stm32f103-minimum/src/stm32_veml6070.c index 72c6583bbcb..5e8765e9e71 100644 --- a/configs/stm32f103-minimum/src/stm32_veml6070.c +++ b/configs/stm32f103-minimum/src/stm32_veml6070.c @@ -49,7 +49,7 @@ #include "stm32_i2c.h" #include "stm32f103_minimum.h" -#if defined(CONFIG_I2C) && defined(CONFIG_VEML6070) +#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_VEML6070) /************************************************************************************ * Pre-processor Definitions @@ -102,4 +102,4 @@ int stm32_veml6070initialize(FAR const char *devpath) return ret; } -#endif /* CONFIG_I2C && CONFIG_VEML6070 && CONFIG_STM32_I2C1 */ +#endif /* CONFIG_I2C && CONFIG_SENSORS_VEML6070 && CONFIG_STM32_I2C1 */ diff --git a/configs/stm32f103-minimum/src/stm32f103_minimum.h b/configs/stm32f103-minimum/src/stm32f103_minimum.h index 9c3e69b726c..f346b87c530 100644 --- a/configs/stm32f103-minimum/src/stm32f103_minimum.h +++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h @@ -225,7 +225,7 @@ int stm32_w25initialize(int minor); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif @@ -334,7 +334,7 @@ int stm32_tone_setup(void); * ***********************************************************************************/ -#ifdef CONFIG_VEML6070 +#ifdef CONFIG_SENSORS_VEML6070 int stm32_veml6070initialize(FAR const char *devpath); #endif diff --git a/configs/stm32f103-minimum/veml6070/defconfig b/configs/stm32f103-minimum/veml6070/defconfig index 8ac33205767..a077d0c0d33 100644 --- a/configs/stm32f103-minimum/veml6070/defconfig +++ b/configs/stm32f103-minimum/veml6070/defconfig @@ -53,5 +53,5 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_TASK_NAME_SIZE=0 CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_VEML6070=y +CONFIG_SENSORS_VEML6070=y CONFIG_WDOG_INTRESERVE=0 diff --git a/configs/stm32f3discovery/src/Makefile b/configs/stm32f3discovery/src/Makefile index 119bca3f598..30a527de262 100644 --- a/configs/stm32f3discovery/src/Makefile +++ b/configs/stm32f3discovery/src/Makefile @@ -56,7 +56,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/stm32f3discovery/src/stm32_appinit.c b/configs/stm32f3discovery/src/stm32_appinit.c index f3da7a8025b..68e9da548f3 100644 --- a/configs/stm32f3discovery/src/stm32_appinit.c +++ b/configs/stm32f3discovery/src/stm32_appinit.c @@ -137,7 +137,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F3DISCO_QETIMER); diff --git a/configs/stm32f3discovery/src/stm32f3discovery.h b/configs/stm32f3discovery/src/stm32f3discovery.h index 0926778d8ab..de3dd3b4f82 100644 --- a/configs/stm32f3discovery/src/stm32f3discovery.h +++ b/configs/stm32f3discovery/src/stm32f3discovery.h @@ -181,7 +181,7 @@ int stm32_pwm_setup(void); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/configs/stm32f429i-disco/README.txt b/configs/stm32f429i-disco/README.txt index fc2719ad009..7bfd00c1819 100644 --- a/configs/stm32f429i-disco/README.txt +++ b/configs/stm32f429i-disco/README.txt @@ -726,7 +726,7 @@ Where is one of the following: CONFIG_EXAMPLES_QENCODER=y : Enable the apps/examples/qencoder CONFIG_SENSORS=y : Enable support for sensors - CONFIG_QENCODER=y : Enable the generic Quadrature Encoder infrastructure + CONFIG_SENSORS_QENCODER=y : Enable the generic Quadrature Encoder infrastructure CONFIG_STM32_TIM8=y : Enable TIM8 CONFIG_STM32_TIM2=n : (Or optionally TIM2) CONFIG_STM32_TIM8_QE=y : Use TIM8 as the quadrature encoder diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index ff516d04c5f..9f173e38e99 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -458,7 +458,7 @@ Quadrature Encoder: CONFIG_BOARD_INITIALIZE=y CONFIG_SENSORS=y - CONFIG_QENCODER=y + CONFIG_SENSORS_QENCODER=y - The timer 2 needs to be enabled: @@ -1691,7 +1691,7 @@ Where is one of the following: CONFIG_EXAMPLES_QENCODER=y : Enable the apps/examples/qencoder CONFIG_SENSORS=y : Enable support for sensors - CONFIG_QENCODER=y : Enable the generic Quadrature Encoder infrastructure + CONFIG_SENSORS_QENCODER=y : Enable the generic Quadrature Encoder infrastructure CONFIG_STM32_TIM8=y : Enable TIM8 CONFIG_STM32_TIM2=n : (Or optionally TIM2) CONFIG_STM32_TIM8_QE=y : Use TIM8 as the quadrature encoder diff --git a/configs/stm32f4discovery/src/Makefile b/configs/stm32f4discovery/src/Makefile index 90a31b04814..5c26078c68a 100644 --- a/configs/stm32f4discovery/src/Makefile +++ b/configs/stm32f4discovery/src/Makefile @@ -96,11 +96,11 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_XEN1210),y) +ifeq ($(CONFIG_SENSORS_XEN1210),y) CSRCS += stm32_xen1210.c endif @@ -116,7 +116,7 @@ ifeq ($(CONFIG_PM_BUTTONS),y) CSRCS += stm32_pmbuttons.c endif -ifeq ($(CONFIG_ZEROCROSS),y) +ifeq ($(CONFIG_SENSORS_ZEROCROSS),y) CSRCS += stm32_zerocross.c endif diff --git a/configs/stm32f4discovery/src/stm32_bringup.c b/configs/stm32f4discovery/src/stm32_bringup.c index a92256635a7..79d7f003301 100644 --- a/configs/stm32f4discovery/src/stm32_bringup.c +++ b/configs/stm32f4discovery/src/stm32_bringup.c @@ -110,7 +110,7 @@ int stm32_bringup(void) stm32_bh1750initialize("/dev/light0"); #endif -#ifdef CONFIG_ZEROCROSS +#ifdef CONFIG_SENSORS_ZEROCROSS /* Configure the zero-crossing driver */ stm32_zerocross_initialize(); @@ -197,7 +197,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F4DISCO_QETIMER); @@ -283,7 +283,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_XEN1210 +#ifdef CONFIG_SENSORS_XEN1210 ret = xen1210_archinitialize(0); #endif diff --git a/configs/stm32f4discovery/src/stm32_xen1210.c b/configs/stm32f4discovery/src/stm32_xen1210.c index b6363a1e2ec..531dd2388f3 100644 --- a/configs/stm32f4discovery/src/stm32_xen1210.c +++ b/configs/stm32f4discovery/src/stm32_xen1210.c @@ -65,15 +65,15 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifdef CONFIG_XEN1210 +#ifdef CONFIG_SENSORS_XEN1210 #ifndef CONFIG_STM32_SPI1 # error "XEN1210 support requires CONFIG_STM32_SPI1" #endif -#define CONFIG_XEN1210_SPIDEV 1 +#define BOARD_XEN1210_SPIDEV 1 -#ifndef CONFIG_XEN1210_DEVMINOR -# define CONFIG_XEN1210_DEVMINOR 0 +#ifndef BOARD_XEN1210_DEVMINOR +# define BOARD_XEN1210_DEVMINOR 0 #endif #ifndef CONFIG_STM32_TIM1 @@ -323,10 +323,10 @@ int xen1210_archinitialize(int minor) /* Get an instance of the I2C interface */ - dev = stm32_spibus_initialize(CONFIG_XEN1210_SPIDEV); + dev = stm32_spibus_initialize(BOARD_XEN1210_SPIDEV); if (!dev) { - snerr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_XEN1210_SPIDEV); + snerr("ERROR: Failed to initialize SPI bus %d\n", BOARD_XEN1210_SPIDEV); return -ENODEV; } @@ -342,7 +342,7 @@ int xen1210_archinitialize(int minor) /* Initialize and register the XEN1210 driver */ - ret = xen1210_register(g_xen1210config.handle, CONFIG_XEN1210_DEVMINOR); + ret = xen1210_register(g_xen1210config.handle, BOARD_XEN1210_DEVMINOR); if (ret < 0) { snerr("ERROR: Failed to register XEN1210 driver: %d\n", ret); diff --git a/configs/stm32f4discovery/src/stm32_zerocross.c b/configs/stm32f4discovery/src/stm32_zerocross.c index 92703f56615..aff78fba2b1 100644 --- a/configs/stm32f4discovery/src/stm32_zerocross.c +++ b/configs/stm32f4discovery/src/stm32_zerocross.c @@ -49,7 +49,7 @@ #include "stm32_gpio.h" #include "stm32f4discovery.h" -#ifdef CONFIG_ZEROCROSS +#ifdef CONFIG_SENSORS_ZEROCROSS /**************************************************************************** * Pre-processor Definitions @@ -202,4 +202,4 @@ int stm32_zerocross_initialize(void) return zc_register("/dev/zc0", &g_zcrosslower); } -#endif /* CONFIG_ZEROCROSS */ +#endif /* CONFIG_SENSORS_ZEROCROSS */ diff --git a/configs/stm32f4discovery/src/stm32f4discovery.h b/configs/stm32f4discovery/src/stm32f4discovery.h index 75478932288..bad8918fdad 100644 --- a/configs/stm32f4discovery/src/stm32f4discovery.h +++ b/configs/stm32f4discovery/src/stm32f4discovery.h @@ -614,7 +614,7 @@ void weak_function stm32_netinitialize(void); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif @@ -626,7 +626,7 @@ int stm32_qencoder_initialize(FAR const char *devpath, int timer); * ****************************************************************************/ -#ifdef CONFIG_ZEROCROSS +#ifdef CONFIG_SENSORS_ZEROCROSS int stm32_zerocross_initialize(void); #endif @@ -740,7 +740,7 @@ int stm32_timer_driver_setup(FAR const char *devpath, int timer); * ****************************************************************************/ -#ifdef CONFIG_XEN1210 +#ifdef CONFIG_SENSORS_XEN1210 int xen1210_archinitialize(int minor); #endif diff --git a/configs/stm32f4discovery/xen1210/defconfig b/configs/stm32f4discovery/xen1210/defconfig index ff9477d4ce1..d725e4d104e 100644 --- a/configs/stm32f4discovery/xen1210/defconfig +++ b/configs/stm32f4discovery/xen1210/defconfig @@ -55,4 +55,4 @@ CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART2_TXBUFSIZE=128 CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_XEN1210=y +CONFIG_SENSORS_XEN1210=y diff --git a/configs/stm32ldiscovery/src/Makefile b/configs/stm32ldiscovery/src/Makefile index 84f146b7cb2..0bfb618418d 100644 --- a/configs/stm32ldiscovery/src/Makefile +++ b/configs/stm32ldiscovery/src/Makefile @@ -56,7 +56,7 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif diff --git a/configs/stm32ldiscovery/src/stm32_appinit.c b/configs/stm32ldiscovery/src/stm32_appinit.c index b49827fd04f..c87229509d1 100644 --- a/configs/stm32ldiscovery/src/stm32_appinit.c +++ b/configs/stm32ldiscovery/src/stm32_appinit.c @@ -101,7 +101,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /* Initialize and register the qencoder driver */ ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32LDISCO_QETIMER); diff --git a/configs/stm32ldiscovery/src/stm32ldiscovery.h b/configs/stm32ldiscovery/src/stm32ldiscovery.h index c8d05a2c44e..161e3c6401e 100644 --- a/configs/stm32ldiscovery/src/stm32ldiscovery.h +++ b/configs/stm32ldiscovery/src/stm32ldiscovery.h @@ -263,7 +263,7 @@ int stm32_pwm_setup(void); * ****************************************************************************/ -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER int stm32_qencoder_initialize(FAR const char *devpath, int timer); #endif diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index 47981b1cee4..226466ad6ea 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -343,7 +343,7 @@ config LM75_I2C_FREQUENCY range 1 100000 depends on LM75_I2C -config LM92 +config SENSORS_LM92 bool "TI LM92 Temperature Sensor support" default n select I2C @@ -356,24 +356,35 @@ config LM92_I2C_FREQUENCY range 1 400000 depends on LM92 -config QENCODER +config SENSORS_QENCODER bool "Qencoder" default n -config VEML6070 +config SENSORS_VEML6070 bool "Vishay VEML6070 UV-A Light Sensor support" default n select I2C ---help--- Enable driver support for the Vishay VEML6070 UV-A light sensor. -config XEN1210 +config VEML6070_I2C_FREQUENCY + int "VEML6070 I2C frequency" + default 100000 + depends on SENSORS_VEML6070 + +config SENSORS_XEN1210 bool "Sensixs XEN1210 Magnetometer" default n select SPI ---help--- Enable driver support for the Sensixs XEN1210 Magnetometer. -config ZEROCROSS +config XEN1210_REGDBUG + bool "Debug support for the XEN1210" + default n + ---help--- + Enables register level debug features for the XEN1210 + +config SENSORS_ZEROCROSS bool "Zero Cross Sensor" default n diff --git a/drivers/sensors/Make.defs b/drivers/sensors/Make.defs index 8ab2d3da851..dbcd515a4ee 100644 --- a/drivers/sensors/Make.defs +++ b/drivers/sensors/Make.defs @@ -158,25 +158,25 @@ endif # CONFIG_SPI # Quadrature encoder upper half -ifeq ($(CONFIG_QENCODER),y) +ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += qencoder.c endif # Vishay VEML6070 -ifeq ($(CONFIG_VEML6070),y) +ifeq ($(CONFIG_SENSORS_VEML6070),y) CSRCS += veml6070.c endif # Sensixs XEN1210 -ifeq ($(CONFIG_XEN1210),y) +ifeq ($(CONFIG_SENSORS_XEN1210),y) CSRCS += xen1210.c endif # Zero Cross upper half -ifeq ($(CONFIG_ZEROCROSS),y) +ifeq ($(CONFIG_SENSORS_ZEROCROSS),y) CSRCS += zerocross.c endif diff --git a/drivers/sensors/as5048b.c b/drivers/sensors/as5048b.c index a0cc34ee3c3..e9eb3c1eac3 100644 --- a/drivers/sensors/as5048b.c +++ b/drivers/sensors/as5048b.c @@ -52,7 +52,7 @@ #include #include -#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_SENSORS_AS5048B) +#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_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_SENSORS_AS5048B */ +#endif /* CONFIG_I2C && CONFIG_SENSORS_QENCODER && CONFIG_SENSORS_AS5048B */ diff --git a/drivers/sensors/qencoder.c b/drivers/sensors/qencoder.c index ead9ec6de75..894581664f6 100644 --- a/drivers/sensors/qencoder.c +++ b/drivers/sensors/qencoder.c @@ -58,7 +58,7 @@ #include -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /**************************************************************************** * Pre-processor Definitions @@ -385,4 +385,4 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower) return register_driver(devpath, &g_qeops, 0666, upper); } -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ diff --git a/drivers/sensors/veml6070.c b/drivers/sensors/veml6070.c index 443782458a2..215a23c0d5d 100644 --- a/drivers/sensors/veml6070.c +++ b/drivers/sensors/veml6070.c @@ -50,7 +50,7 @@ #include #include -#if defined(CONFIG_I2C) && defined(CONFIG_VEML6070) +#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_VEML6070) /**************************************************************************** * Pre-process Definitions @@ -354,4 +354,4 @@ int veml6070_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, return ret; } -#endif /* CONFIG_I2C && CONFIG_VEML6070 */ +#endif /* CONFIG_I2C && CONFIG_SENSORS_VEML6070 */ diff --git a/drivers/sensors/xen1210.c b/drivers/sensors/xen1210.c index 0603b4486fc..bb7858ae39a 100644 --- a/drivers/sensors/xen1210.c +++ b/drivers/sensors/xen1210.c @@ -53,7 +53,7 @@ #include "xen1210.h" -#if defined(CONFIG_XEN1210) +#if defined(CONFIG_SENSORS_XEN1210) /**************************************************************************** * Private Function Prototypes diff --git a/drivers/sensors/xen1210.h b/drivers/sensors/xen1210.h index 08e7b4aba4f..22ac33553ca 100644 --- a/drivers/sensors/xen1210.h +++ b/drivers/sensors/xen1210.h @@ -49,7 +49,7 @@ #include #include -#if defined(CONFIG_XEN1210) +#if defined(CONFIG_SENSORS_XEN1210) /******************************************************************************************** * Pre-processor Definitions diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c index 0140b9ba728..770ca556907 100644 --- a/drivers/sensors/zerocross.c +++ b/drivers/sensors/zerocross.c @@ -58,7 +58,7 @@ #include -#ifdef CONFIG_ZEROCROSS +#ifdef CONFIG_SENSORS_ZEROCROSS /**************************************************************************** * Pre-processor Definitions @@ -541,4 +541,4 @@ int zc_register(FAR const char *devname, FAR struct zc_lowerhalf_s *lower) return ret; } -#endif /* CONFIG_ZEROCROSS */ +#endif /* CONFIG_SENSORS_ZEROCROSS */ diff --git a/include/nuttx/sensors/as5048b.h b/include/nuttx/sensors/as5048b.h index 79d8244a60f..377012f501a 100644 --- a/include/nuttx/sensors/as5048b.h +++ b/include/nuttx/sensors/as5048b.h @@ -43,7 +43,7 @@ #include #include -#if defined(CONFIG_I2C) && defined(CONFIG_QENCODER) && defined(CONFIG_SENSORS_AS5048B) +#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_QENCODER) && defined(CONFIG_SENSORS_AS5048B) /**************************************************************************** * Pre-processor Definitions @@ -137,5 +137,5 @@ FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c, } #endif -#endif /* CONFIG_I2C && CONFIG_QENCODER && CONFIG_SENSORS_AS5048B */ +#endif /* CONFIG_I2C && CONFIG_SENSORS_QENCODER && CONFIG_SENSORS_AS5048B */ #endif /* __INCLUDE_NUTTX_SENSORS_AS5048B */ diff --git a/include/nuttx/sensors/qencoder.h b/include/nuttx/sensors/qencoder.h index 33041f254e9..c9239f1d6af 100644 --- a/include/nuttx/sensors/qencoder.h +++ b/include/nuttx/sensors/qencoder.h @@ -43,13 +43,13 @@ #include #include -#ifdef CONFIG_QENCODER +#ifdef CONFIG_SENSORS_QENCODER /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************ - * CONFIG_QENCODER - Enables support for the quadrature encoder upper half + * CONFIG_SENSORS_QENCODER - Enables support for the quadrature encoder upper half */ /* IOCTL Commands ***********************************************************/ @@ -187,5 +187,5 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower); } #endif -#endif /* CONFIG_QENCODER */ +#endif /* CONFIG_SENSORS_QENCODER */ #endif /* __INCLUDE_NUTTX_SENSORS_QENCODER_H */ diff --git a/include/nuttx/sensors/veml6070.h b/include/nuttx/sensors/veml6070.h index 487eb539599..bd06326eae0 100644 --- a/include/nuttx/sensors/veml6070.h +++ b/include/nuttx/sensors/veml6070.h @@ -45,7 +45,7 @@ #include #include -#if defined(CONFIG_VEML6070) +#if defined(CONFIG_SENSORS_VEML6070) /**************************************************************************** * Pre-processor Definitions @@ -118,5 +118,5 @@ int veml6070_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, } #endif -#endif /* CONFIG_VEML6070 */ +#endif /* CONFIG_SENSORS_VEML6070 */ #endif /* __INCLUDE_NUTTX_SENSORS_VEML6070_H */ diff --git a/include/nuttx/sensors/xen1210.h b/include/nuttx/sensors/xen1210.h index d76b5048331..e06a05894b8 100644 --- a/include/nuttx/sensors/xen1210.h +++ b/include/nuttx/sensors/xen1210.h @@ -43,7 +43,7 @@ #include #include -#if defined(CONFIG_XEN1210) +#if defined(CONFIG_SENSORS_XEN1210) /******************************************************************************************** * Pre-processor Definitions @@ -56,7 +56,7 @@ * * Settings that effect the driver: CONFIG_DISABLE_POLL * - * CONFIG_XEN1210 + * CONFIG_SENSORS_XEN1210 * Enables support for the XEN1210 driver */ diff --git a/include/nuttx/sensors/zerocross.h b/include/nuttx/sensors/zerocross.h index 6d7ce40b87e..a1446aa9d27 100644 --- a/include/nuttx/sensors/zerocross.h +++ b/include/nuttx/sensors/zerocross.h @@ -43,13 +43,13 @@ #include #include -#ifdef CONFIG_ZEROCROSS +#ifdef CONFIG_SENSORS_ZEROCROSS /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************ - * CONFIG_ZEROCROSS - Enables support for the zero cross AC detection upper + * CONFIG_SENSORS_ZEROCROSS - Enables support for the zero cross AC detection upper * half */ @@ -147,5 +147,5 @@ int zc_register(FAR const char *devpath, FAR struct zc_lowerhalf_s *lower); } #endif -#endif /* CONFIG_ZEROCROSS */ +#endif /* CONFIG_SENSORS_ZEROCROSS */ #endif /* __INCLUDE_NUTTX_SENSORS_ZEROCROSS_H */