risc-v: Add WFI to up_idle and fix compile issue

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2022-02-10 10:42:48 +08:00 committed by Xiang Xiao
parent d426875fcf
commit 6f18747dc2

View File

@ -53,4 +53,13 @@ void up_idle(void)
*/
nxsched_process_timer();
#else
/* 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
*/
asm("WFI");
#endif
}