diff --git a/components/driver/rtc_module.c b/components/driver/rtc_module.c index fe3aea71a3..ff9ed8bb51 100644 --- a/components/driver/rtc_module.c +++ b/components/driver/rtc_module.c @@ -398,6 +398,21 @@ void rtc_gpio_force_hold_dis_all() /*--------------------------------------------------------------- Touch Pad ---------------------------------------------------------------*/ +//Some register bits of touch sensor 8 and 9 are mismatched, we need to swap the bits. +#define BITSWAP(data, n, m) (((data >> n) & 0x1) == ((data >> m) & 0x1) ? (data) : ((data) ^ ((0x1 <filtered_val[touch_num] >> TOUCH_PAD_SHIFT_DEFAULT); return ESP_OK; }