External wakeup from deep sleep on XIAO ESP32C3

hi there,
i was struggeling with the external deep sleep too on my xiao esp32c3 and a touch-button, and finally got it working
after lots of searching i found that the code needs a bitmask of the pin number, not the pin number or gpio number
for pin gpio3 it translated to: 1ULL << 3

in the below code i got a fairly long delay wich is only to give me more time to upload changes without pushing buttons so you can totally ignore those delays…

hope this helps.
this is the sleep related code i use in my sketch: (not my complete code)

#define   TouchPin  GPIO_NUM_3

void setup() {
  pinMode(TouchPin,  INPUT);
}

void gotoSleep() {
  Serial.println("going to sleep in 30 sec....");   
  delay(30000); 
  esp_deep_sleep_enable_gpio_wakeup(1ULL << 3,ESP_GPIO_WAKEUP_GPIO_HIGH);  
  Serial.println("going to sleep now"); 
  delay(1000);
  esp_deep_sleep_start();   

}