ESP32-S3 GPIO.out_w1ts error Master Branch

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

ESP32-S3 GPIO.out_w1ts error Master Branch

Postby username » Mon May 30, 2022 7:54 am

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 ?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32-S3 GPIO.out_w1ts error Master Branch

Postby ESP_igrr » 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.

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32-S3 GPIO.out_w1ts error Master Branch

Postby username » Tue May 31, 2022 12:08 am

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!

Who is online

Users browsing this forum: username and 101 guests