bugfix: ext0_wakeup_prepare func when s_config.wakeup_triggers & RTC_EXT0_TRIG_EN == false

This commit is contained in:
Lou Tianhao
2023-11-17 16:53:19 +08:00
parent 7343d16a13
commit d97f45b3a8
5 changed files with 48 additions and 2 deletions

View File

@@ -360,7 +360,7 @@ static inline void rtcio_ll_disable_sleep_setting(int rtcio_num)
}
/**
* Set specific logic level on an RTC IO pin as a wakeup trigger.
* Set specific logic level on an RTC IO pin as a ext0 wakeup trigger.
*
* @param rtcio_num The index of rtcio. 0 ~ MAX(rtcio).
* @param level Logic level (0)
@@ -373,6 +373,16 @@ static inline void rtcio_ll_ext0_set_wakeup_pin(int rtcio_num, int level)
level , RTC_CNTL_EXT_WAKEUP0_LV_S);
}
/**
* Clear ext0 wakeup trigger.
*/
static inline void rtcio_ll_ext0_clear_wakeup_pins(void)
{
REG_SET_FIELD(RTC_IO_EXT_WAKEUP0_REG, RTC_IO_EXT_WAKEUP0_SEL, 0);
// Clear level which will trigger wakeup
SET_PERI_REG_BITS(RTC_CNTL_EXT_WAKEUP_CONF_REG, 0x1,
0 , RTC_CNTL_EXT_WAKEUP0_LV_S);
}
#ifdef __cplusplus
}
#endif