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

Support for ESP32 #25

Open
fabltd opened this issue Jul 10, 2020 · 4 comments
Open

Support for ESP32 #25

fabltd opened this issue Jul 10, 2020 · 4 comments

Comments

@fabltd
Copy link

fabltd commented Jul 10, 2020

Hi

This will not compile on the ESP32 due to differences in the wire lib.

Please fix.

@Bach-Danielsson
Copy link

Bach-Danielsson commented Aug 10, 2020

Hi
In the ECCX08.cpp file change from:

while (_wire->requestFrom((uint8_t)_address, (size_t)responseSize, (bool)true) != responseSize && retries--);

to:

while (_wire->requestFrom((uint8_t)_address, (uint8_t)responseSize, (bool)true) != responseSize && retries--);

then you dont get the comment from your compiler regarding differences in the wire lib,

@fabltd
Copy link
Author

fabltd commented Aug 10, 2020

Hi

Still a lot of warnings:

lib/ATECCx08/src/ECCX08.cpp: In member function 'int ECCX08Class::receiveResponse(void*, size_t)':
lib/ATECCx08/src/ECCX08.cpp:724:81: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   while (_wire->requestFrom((uint8_t)_address, (uint8_t)responseSize, (bool)true) != responseSize && retries--);
                                                                                 ^
In file included from lib/ATECCx08/src/ECCX08.h:24:0,
                 from lib/ATECCx08/src/ECCX08.cpp:22:

/Users/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:98:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int, int)
     uint8_t requestFrom(int address, int size, int sendStop);
             ^
/Users/jeremy/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:96:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)
     uint8_t requestFrom(uint8_t address, uint8_t size, uint8_t sendStop);
             ^
lib/ATECCx08/src/ECCX08.cpp:724:81: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   while (_wire->requestFrom((uint8_t)_address, (uint8_t)responseSize, (bool)true) != responseSize && retries--);
                                                                                 ^
In file included from lib/ATECCx08/src/ECCX08.h:24:0,
                 from lib/ATECCx08/src/ECCX08.cpp:22:

/Users/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:98:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int, int)
     uint8_t requestFrom(int address, int size, int sendStop);
             ^
/Users/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:94:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint16_t, uint8_t, uint8_t)
     uint8_t requestFrom(uint16_t address, uint8_t size, uint8_t sendStop);
             ^
lib/ATECCx08/src/ECCX08.cpp:724:81: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   while (_wire->requestFrom((uint8_t)_address, (uint8_t)responseSize, (bool)true) != responseSize && retries--);
                                                                                 ^
In file included from lib/ATECCx08/src/ECCX08.h:24:0,
                 from lib/ATECCx08/src/ECCX08.cpp:22:
/Users/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:98:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int, int)
     uint8_t requestFrom(int address, int size, int sendStop);
             ^
/Users/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:93:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint16_t, uint8_t, bool)
     uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop);

@torntrousers
Copy link
Contributor

That change suggested by @Bach-Danielsson works for me on an M5Stack IoT EduKit. Would be great to get it out in a release of the library.

@torntrousers
Copy link
Contributor

Also see #36 for the same issue with this lib but with a Teensy instead of ESP32

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

3 participants