mirror of
https://github.com/apache/nuttx.git
synced 2026-08-07 13:37:18 +00:00
boards/stm32f4disco: add timer driver support
This commit is contained in:
parent
68970fe8a1
commit
ca95d592d3
2 changed files with 15 additions and 0 deletions
|
|
@ -49,6 +49,11 @@ config STM32F4DISCO_QETIMER
|
|||
default 2
|
||||
depends on SENSORS_QENCODER
|
||||
|
||||
config STM32F4DISCO_TIMER
|
||||
int "Timer to use with timer driver"
|
||||
default 4
|
||||
depends on TIMER
|
||||
|
||||
config STM32F4DISCO_LIS3DSH
|
||||
bool "Enable LIS3DSH driver for the IMU on STM32F4Discovery (rev. MB997C)"
|
||||
default n
|
||||
|
|
|
|||
|
|
@ -351,6 +351,16 @@ int stm32_bringup(void)
|
|||
}
|
||||
#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
|
||||
/* Initialize Capture and register the Capture driver. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue