Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in 2.0.4 and ESP32-S3 #243

Open
zanivanov opened this issue Apr 9, 2023 · 1 comment
Open

Problem in 2.0.4 and ESP32-S3 #243

zanivanov opened this issue Apr 9, 2023 · 1 comment

Comments

@zanivanov
Copy link

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

@RobTillaart
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants