Page 1 of 1

touch_pad_t - is it a type of variable?

Posted: Thu Oct 22, 2020 9:13 am
by gennady.sterlin
Hi,
I am a beginner, so my question is very simple:

What is "touch_pad_t"?
Is this a special type of variable?
If so, where is this type stored? Is it stored in RTC_memory to survive in a sleep mode?

Thank anyone in advance for help.
Gennady

Re: touch_pad_t - is it a type of variable?

Posted: Fri Oct 23, 2020 2:03 am
by ESP_Sprite
It's a simple enum, nothing special about it. From components/hal/include/hal/touch_sensor_types.h:

Code: Select all

/** Touch pad channel */                                                                                                                                                                                             
typedef enum {                                                                                                                                                                                                       
    TOUCH_PAD_NUM0 = 0, /*!< Touch pad channel 0 is GPIO4(ESP32) */                                                                                                                                                  
    TOUCH_PAD_NUM1,     /*!< Touch pad channel 1 is GPIO0(ESP32) / GPIO1(ESP32-S2) */                                                                                                                                
    TOUCH_PAD_NUM2,     /*!< Touch pad channel 2 is GPIO2(ESP32) / GPIO2(ESP32-S2) */                                                                                                                                
    TOUCH_PAD_NUM3,     /*!< Touch pad channel 3 is GPIO15(ESP32) / GPIO3(ESP32-S2) */                                                                                                                               
     [...]                                                                                                                                                                                                   
    TOUCH_PAD_MAX,                                                                                                                                                                                                   
} touch_pad_t;

Re: touch_pad_t - is it a type of variable?

Posted: Fri Oct 23, 2020 3:30 pm
by gennady.sterlin
Hi ESP_Sprite,

Thank you very mush for your help.
Where can I find file components/hal/include/hal/touch_sensor_types.h ?

Looking forward to your response
gennady.sterlin

Re: touch_pad_t - is it a type of variable?

Posted: Fri Oct 23, 2020 6:58 pm
by rudi ;-)
gennady.sterlin wrote:
Fri Oct 23, 2020 3:30 pm

Where can I find file components/hal/include/hal/touch_sensor_types.h ?
you find it in the folder you exactly named in your from github installed/downloaded esp-idf
or if you not have on your desk also online at github.com

cause it is github
you can find github on internet likewise
https://github.com

cause it is espressif stuff we are talking about
you can find the repo stuff from espressif at github under espressif account likewise
https://github.com/espressif

cause the development things are in the esp-idf repo
you can find the SDK Repo from espressif's esp-idf likewise
https://github.com/espressif/esp-idf

cause you are searching for the file components/hal/include/hal/touch_sensor_types.h
you can find this file exactly same folder in the espressif esp-idf github repo likewise
( will not found )
https://github.com/espressif/esp-idf/co ... or_types.h

(so use blob as link here )
https://github.com/espressif/esp-idf/bl ... or_types.h
( or use RAW as link here)
https://raw.githubusercontent.com/espre ... or_types.h

its in the esp.idf repo likewise
esp-idf/components/hal/include/hal/touch_sensor_types.h

regards