PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

ESP32 fixes #53

Closed kurkle closed 6 years ago

kurkle commented 6 years ago

Compilation errors (#undef's in OneWire.h) and warnigs (added #undefs in OneWire_direct.h) Functionality (didn't work at all, was something in input/output modes) Simplified to oneliners.

PaulStoffregen commented 6 years ago

The purpose of those undefs is to prevent OneWire.h from defining names in the user's sketch and other libraries. Only OneWire.cpp is supposed to have that stuff defined.

kurkle commented 6 years ago

So undefs with inline functions might cause problems with some compilers. There are some in arc and __riscv, do those compile alright? Edit: Its actually the IO_REG_TYPE used inside those inline functions that gets undefined after expansion. Probably some compiler flag would fix this.

PaulStoffregen commented 6 years ago

fixed