mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
bugfix: ext0_wakeup_prepare func when s_config.wakeup_triggers & RTC_EXT0_TRIG_EN == false
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user