mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-23 17:24:44 +00:00
feat(ulp): LP Timer interrupt support
This commit adds support for the LP Timer interrupt to be used by the LP Core. Merges https://github.com/espressif/esp-idf/pull/15717
This commit is contained in:
@@ -104,6 +104,20 @@ void ulp_lp_core_sw_intr_enable(bool enable);
|
||||
*/
|
||||
void ulp_lp_core_sw_intr_clear(void);
|
||||
|
||||
#if SOC_LP_TIMER_SUPPORTED
|
||||
/**
|
||||
* @brief Enable the LP Timer interrupt
|
||||
*
|
||||
*/
|
||||
void ulp_lp_core_lp_timer_intr_enable(bool enable);
|
||||
|
||||
/**
|
||||
* @brief Clear the interrupt status for the LP Timer interrupt
|
||||
*
|
||||
*/
|
||||
void ulp_lp_core_lp_timer_intr_clear(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Puts the CPU into a wait state until an interrupt is triggered
|
||||
*
|
||||
|
@@ -191,6 +191,18 @@ void ulp_lp_core_sw_intr_clear(void)
|
||||
pmu_ll_lp_clear_sw_intr_status(&PMU);
|
||||
}
|
||||
|
||||
#if SOC_LP_TIMER_SUPPORTED
|
||||
void ulp_lp_core_lp_timer_intr_enable(bool enable)
|
||||
{
|
||||
lp_timer_ll_lp_alarm_intr_enable(&LP_TIMER, enable);
|
||||
}
|
||||
|
||||
void ulp_lp_core_lp_timer_intr_clear(void)
|
||||
{
|
||||
lp_timer_ll_clear_lp_alarm_intr_status(&LP_TIMER);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ulp_lp_core_wait_for_intr(void)
|
||||
{
|
||||
asm volatile("wfi");
|
||||
|
Reference in New Issue
Block a user