arch/xtensa/esp32: Fix typo and check PU/PD registers

This commit is contained in:
Lucas Saavedra Vaz 2022-12-28 03:01:38 -03:00 committed by Xiang Xiao
parent 3dad6b273e
commit cdd0787b54
2 changed files with 10 additions and 3 deletions

View File

@ -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)
{

View File

@ -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.