From 29775f824bf0754c207255d0d1bd8c8060e234b8 Mon Sep 17 00:00:00 2001 From: Rodrigo Sim Date: Sat, 18 May 2024 12:28:05 -0300 Subject: [PATCH] drivers/sensors/Kconfig: Fix HC-SR04 configuration Signed-off-by: Rodrigo Sim rcsim10@gmail.com --- .../stm32f401rc-rs485/src/stm32_bringup.c | 1 - drivers/sensors/Kconfig | 32 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_bringup.c b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_bringup.c index 036408d9df8fa..be180a262b9c0 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_bringup.c @@ -63,7 +63,6 @@ #include "stm32_hcsr04.h" #endif - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index 6b194d616e906..195367a084957 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -478,6 +478,22 @@ config SENSORS_HCSR04 ---help--- Enable driver support for the HC-SR04 Distance Sensor. +if SENSORS_HCSR04 + +config HCSR04_DEBUG + bool "Debug support for the HC-SR04" + default n + ---help--- + Enables debug features for the HC-SR04 + +config HCSR04_NPOLLWAITERS + int "Number of waiters to poll" + default 1 + ---help--- + Number of waiters to poll + +endif # SENSORS_HCSR04 + config SENSORS_HYT271 bool "IST HYT271 Humidity and Temperature Sensor support" default n @@ -506,22 +522,6 @@ config SENSORS_HYT271_THREAD_STACKSIZE ---help--- The stack size for the worker thread. -if SENSORS_HCSR04 - -config HCSR04_DEBUG - bool "Debug support for the HC-SR04" - default n - ---help--- - Enables debug features for the HC-SR04 - -config HCSR04_NPOLLWAITERS - int "Number of waiters to poll" - default 1 - ---help--- - Number of waiters to poll - -endif # SENSORS_HCSR04 - config SENSORS_ISL29023 bool "Renesas ISL29023 ALS sensor" default n