I am using OneWire 2.3.7 in Arduino IDE 2.3.2 with a "SparkFun ESP32-C6 WROOM Qwiic Pocket".
The sketch compile fails with:
Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:134:17: error: 'GPIO' was not declared in this scope; did you mean 'PI'?
134 | return (GPIO.in >> pin) & 0x1;
I can see that soc/gpio_struct.h defines GPIO, but it is not included in OneWire_direct_gpio.h. Putting #include <soc/gpio_sruct.h> in my sketch is no help, because it is the OneWire lib that needs it and I assume that OneWire lib gets compiled for my board whenever I compile my sketch. Therefore I think this needs to be fixed in OneWire.
However I don't know how to do that - I put #include <soc/gpio_sruct.h> in OneWire.h, but now the compile fails because it can't find gpio_struct.h
The sketch compile fails with:
Arduino\libraries\OneWire\util/OneWire_direct_gpio.h:134:17: error: 'GPIO' was not declared in this scope; did you mean 'PI'?
134 | return (GPIO.in >> pin) & 0x1;
I can see that soc/gpio_struct.h defines GPIO, but it is not included in OneWire_direct_gpio.h. Putting #include <soc/gpio_sruct.h> in my sketch is no help, because it is the OneWire lib that needs it and I assume that OneWire lib gets compiled for my board whenever I compile my sketch. Therefore I think this needs to be fixed in OneWire.
However I don't know how to do that - I put #include <soc/gpio_sruct.h> in OneWire.h, but now the compile fails because it can't find gpio_struct.h