Driver: gpio and rtcio dirver update
This commit is contained in:
parent
60db9e1a34
commit
83e00cf643
2 changed files with 42 additions and 1 deletions
|
@ -628,7 +628,6 @@ esp_err_t gpio_force_unhold_all()
|
|||
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void gpio_iomux_in(uint32_t gpio, uint32_t signal_idx)
|
||||
|
|
|
@ -122,6 +122,48 @@ static touch_pad_filter_t *s_touch_pad_filter = NULL;
|
|||
static uint16_t s_touch_pad_init_bit = 0x0000;
|
||||
static filter_cb_t s_filter_cb = NULL;
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2BETA
|
||||
typedef volatile struct {
|
||||
uint32_t reserved0: 13;
|
||||
uint32_t fun_ie: 1; /*input enable in work mode*/
|
||||
uint32_t slp_oe: 1; /*output enable in sleep mode*/
|
||||
uint32_t slp_ie: 1; /*input enable in sleep mode*/
|
||||
uint32_t slp_sel: 1; /*1: enable sleep mode during sleep 0: no sleep mode*/
|
||||
uint32_t fun_sel: 2; /*function sel*/
|
||||
uint32_t mux_sel: 1; /*1: use RTC GPIO 0: use digital GPIO*/
|
||||
uint32_t reserved20: 7;
|
||||
uint32_t rue: 1; /*RUE*/
|
||||
uint32_t rde: 1; /*RDE*/
|
||||
uint32_t drv: 2; /*DRV*/
|
||||
uint32_t reserved31: 1;
|
||||
} rtc_gpio_info_t;
|
||||
|
||||
static rtc_gpio_info_t* rtc_gpio[RTC_GPIO_NUMBER] = {
|
||||
&RTCIO.touch_pad[0].val,
|
||||
&RTCIO.touch_pad[1].val,
|
||||
&RTCIO.touch_pad[2].val,
|
||||
&RTCIO.touch_pad[3].val,
|
||||
&RTCIO.touch_pad[4].val,
|
||||
&RTCIO.touch_pad[5].val,
|
||||
&RTCIO.touch_pad[6].val,
|
||||
&RTCIO.touch_pad[7].val,
|
||||
&RTCIO.touch_pad[8].val,
|
||||
&RTCIO.touch_pad[9].val,
|
||||
&RTCIO.touch_pad[10].val,
|
||||
&RTCIO.touch_pad[11].val,
|
||||
&RTCIO.touch_pad[12].val,
|
||||
&RTCIO.touch_pad[13].val,
|
||||
&RTCIO.touch_pad[14].val,
|
||||
&RTCIO.xtal_32p_pad.val,
|
||||
&RTCIO.xtal_32n_pad.val,
|
||||
&RTCIO.pad_dac[0].val,
|
||||
&RTCIO.pad_dac[1].val,
|
||||
&RTCIO.rtc_pad19.val,
|
||||
&RTCIO.rtc_pad20.val,
|
||||
&RTCIO.rtc_pad21.val
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
ADC_CTRL_RTC = 0,
|
||||
ADC_CTRL_ULP = 1,
|
||||
|
|
Loading…
Reference in a new issue