This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 9223547afc084a90c624f8e73356b7187a9bab77 Author: Huang Qi <[email protected]> AuthorDate: Thu Feb 10 11:00:05 2022 +0800 risc-v: Support cpu activity led in up_idle Signed-off-by: Huang Qi <[email protected]> --- arch/risc-v/src/common/riscv_idle.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/risc-v/src/common/riscv_idle.c b/arch/risc-v/src/common/riscv_idle.c index 96819e3..73aa510 100644 --- a/arch/risc-v/src/common/riscv_idle.c +++ b/arch/risc-v/src/common/riscv_idle.c @@ -25,6 +25,8 @@ #include <nuttx/config.h> #include <nuttx/irq.h> #include <nuttx/arch.h> +#include <nuttx/board.h> +#include <arch/board/board.h> #include "riscv_internal.h" @@ -55,6 +57,14 @@ void up_idle(void) nxsched_process_timer(); #else + /* Does the board support an IDLE LED to indicate that the board is in the + * IDLE state? + */ + +#ifdef CONFIG_ARCH_LEDS_CPU_ACTIVITY + board_autoled_off(LED_CPU); +#endif + /* This would be an appropriate place to put some MCU-specific logic to * sleep in a reduced power mode until an interrupt occurs to save power */
