Open zanivanov opened 1 year ago
This is not a problem of this library, but from the oneWire library. It is due the compiler setting that unused variables are considered an error.
To solve you need to change compiler settings. Or create an issue (PR) in the oneWire lib.
Possible option is to use oneWire NG, an alternative implementation of the OW protocol. (Disclaimer never tried it myself)
Hello No building for ESP32-S3 (BPI-Leaf-S3) Test example Simple.ino
c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::reset()': c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp:167:24: error: unused variable 'reg' [-Werror=unused-variable] volatile IO_REG_TYPE reg IO_REG_BASE_ATTR = baseReg; ^~~ c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)': c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp:201:24: error: unused variable 'reg' [-Werror=unused-variable] volatile IO_REG_TYPE reg IO_REG_BASE_ATTR = baseReg; ^~~ c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::read_bit()': c:\Users\user\Documents\Arduino\libraries\OneWire\OneWire.cpp:229:24: error: unused variable 'reg' [-Werror=unused-variable] volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg; ^~~ cc1plus.exe: some warnings being treated as errors
Using library OneWire at version 2.3.7 in folder: C:\Users\user\Documents\Arduino\libraries\OneWire exit status 1
Compilation error: exit status 1