boards/stm32f4disco: add timer driver support

This commit is contained in:
raiden00pl 2023-02-07 17:00:04 +01:00 committed by Xiang Xiao
parent 68970fe8a1
commit ca95d592d3
2 changed files with 15 additions and 0 deletions

View File

@ -49,6 +49,11 @@ config STM32F4DISCO_QETIMER
default 2 default 2
depends on SENSORS_QENCODER depends on SENSORS_QENCODER
config STM32F4DISCO_TIMER
int "Timer to use with timer driver"
default 4
depends on TIMER
config STM32F4DISCO_LIS3DSH config STM32F4DISCO_LIS3DSH
bool "Enable LIS3DSH driver for the IMU on STM32F4Discovery (rev. MB997C)" bool "Enable LIS3DSH driver for the IMU on STM32F4Discovery (rev. MB997C)"
default n default n

View File

@ -351,6 +351,16 @@ int stm32_bringup(void)
} }
#endif #endif
#ifdef CONFIG_TIMER
/* Initialize TIMER and register the TIMER device. */
ret = stm32_timer_driver_setup("/dev/timer0", CONFIG_STM32F4DISCO_TIMER);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_timer_driver_setup() failed: %d\n", ret);
}
#endif
#ifdef CONFIG_CAPTURE #ifdef CONFIG_CAPTURE
/* Initialize Capture and register the Capture driver. */ /* Initialize Capture and register the Capture driver. */