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:
Michal Lenc 2026-03-22 22:55:01 +01:00 committed by Xiang Xiao
parent a84d263f09
commit f07e4e690b

View file

@ -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. */