mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 09:37:00 +08:00
Merge branch 'feature/add_cpu_wait_for_low_power' into 'master'
Add CPU wait to save power See merge request sdk/ESP8266_RTOS_SDK!912
This commit is contained in:
@ -128,6 +128,16 @@ static inline uint32_t soc_get_int_mask(void)
|
||||
return mask & enable & ETS_INT_MASK;
|
||||
}
|
||||
|
||||
static inline void soc_wait_int(void)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
"waiti 0\n"
|
||||
:
|
||||
:
|
||||
: "memory"
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -342,6 +342,8 @@ void esp_internal_idle_hook(void)
|
||||
|
||||
esp_task_wdt_reset();
|
||||
pmIdleHook();
|
||||
|
||||
soc_wait_int();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_FREERTOS
|
||||
|
Reference in New Issue
Block a user