mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
nucleo-l476rg: register userleds device driver if CONFIG_USERLED is set
This enhances the bringup file with /dev/userleds registration if CONFIG_USERLED option is set. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
parent
a84d263f09
commit
f07e4e690b
1 changed files with 14 additions and 0 deletions
|
|
@ -57,6 +57,10 @@
|
|||
#include "stm32_bmp280.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USERLED
|
||||
# include <nuttx/leds/userled.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_MPU9250
|
||||
#include "stm32_mpu9250.h"
|
||||
#endif
|
||||
|
|
@ -247,6 +251,16 @@ int stm32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USERLED
|
||||
/* Register the LED driver */
|
||||
|
||||
ret = userled_lower_initialize("/dev/userleds");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PWM
|
||||
/* Initialize PWM and register the PWM device. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue