feat(ulp): add api to get lp_cpu wakeup cause and clear wakeup source at startup

Closes https://github.com/espressif/esp-idf/issues/12651
This commit is contained in:
wuzhenghui
2023-12-12 21:03:52 +08:00
parent ddd142e624
commit 53afab3850
7 changed files with 106 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
#include <stdbool.h>
#include "hal/assert.h"
#include "hal/misc.h"
#include "hal/lp_aon_ll.h"
#include "soc/soc_etm_struct.h"
#ifdef __cplusplus
@@ -98,6 +99,10 @@ static inline void etm_ll_channel_set_task(soc_etm_dev_t *hw, uint32_t chan, uin
hw->channel[chan].task_id.task_id = task;
}
#define etm_ll_is_lpcore_wakeup_triggered() lp_aon_ll_get_lpcore_etm_wakeup_flag()
#define etm_ll_clear_lpcore_wakeup_status() lp_aon_ll_clear_lpcore_etm_wakeup_flag()
#ifdef __cplusplus
}
#endif