arch/xtensa/esp32: Fix typo and check PU/PD registers
This commit is contained in:
parent
3dad6b273e
commit
cdd0787b54
|
@ -241,8 +241,15 @@ int esp32_configgpio(int pin, gpio_pinattr_t attr)
|
|||
(((RTCIO_PIN_FUNC) & RTC_IO_TOUCH_PAD1_FUN_SEL_V) <<
|
||||
(rtc_reg_desc.func)));
|
||||
|
||||
resetbits(rtc_reg_desc.reg, rtc_reg_desc.pulldown);
|
||||
resetbits(rtc_reg_desc.reg, rtc_reg_desc.pullup);
|
||||
if (rtc_reg_desc.pulldown)
|
||||
{
|
||||
resetbits(rtc_reg_desc.reg, rtc_reg_desc.pulldown);
|
||||
}
|
||||
|
||||
if (rtc_reg_desc.pullup)
|
||||
{
|
||||
resetbits(rtc_reg_desc.reg, rtc_reg_desc.pullup);
|
||||
}
|
||||
|
||||
if ((attr & PULLUP) != 0)
|
||||
{
|
||||
|
|
|
@ -495,7 +495,7 @@ static void touch_set_voltage(struct touch_config_volt_s *volt)
|
|||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: touch_set_voltage
|
||||
* Name: touch_set_meas_mode
|
||||
*
|
||||
* Description:
|
||||
* Set the measurement mode for a given touch pad.
|
||||
|
|
Loading…
Reference in New Issue