mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
risc-v/qemu-rv: Initialize the userleds without late initialization
If CONFIG_BOARD_LATE_INITIALIZE is not selected, the userleds will not be initialized. The userled initialization is not required to be done within board_late_initialize(), thus this commit enables initializing it in board_app_initialize() too.
This commit is contained in:
committed by
Xiang Xiao
parent
2c5d849e01
commit
7c24ef438e
@@ -146,6 +146,16 @@ int board_app_initialize(uintptr_t arg)
|
|||||||
qemu_rptun_init();
|
qemu_rptun_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USERLED
|
||||||
|
/* Register the LED driver */
|
||||||
|
|
||||||
|
int ret = userled_lower_initialize("/dev/userleds");
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user