Page 1 of 1

ESP32-S3 GPIO.out_w1ts error Master Branch

Posted: Mon May 30, 2022 7:54 am
by username
I have been using the following with no problems on ESP-IDF 4.4.1.

GPIO.out_w1tc = ((uint32_t)1 << pin);
GPIO.out1_w1tc.val = ((uint32_t)1 << (pin - 32));

I recently installed the master branch, and I now get an error stating:
error: 'GPIO' undeclared (first use in this function)

Any ideas why this is ?

Re: ESP32-S3 GPIO.out_w1ts error Master Branch

Posted: Tue May 31, 2022 12:03 am
by ESP_igrr
It is likely that previously the header file where GPIO structure is defined was included through some other header file. Please try adding #include "soc/gpio_struct.h" to your source file.

Re: ESP32-S3 GPIO.out_w1ts error Master Branch

Posted: Tue May 31, 2022 12:08 am
by username
ESP_igrr wrote:
Tue May 31, 2022 12:03 am
It is likely that previously the header file where GPIO structure is defined was included through some other header file. Please try adding #include "soc/gpio_struct.h" to your source file.
That fixed it!! Thank you so much!