-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
(Arduino Nano Every) RtcDS3231.h requestFrom() function with ambiguous declaration #196
Comments
This "issue" is caused by the Wire library for that platform not following the standards. They are missing the one that takes two arguments, both uint8_t. From AVR Wire.h (and many other platforms)
from the nano every Wire.h
and from ESP32
The library is written to work on minimal used standard and does compile without warnings if the platform is written to those standards. |
I would suggest going to the Nano Every issue tracking and add an issue for them to supply a compliant method that meets the standards set already on other platforms. |
After some searching around this is what I could find. The Nano Every is a megaAVR board which is already using the ArduinoCore-API, while AVR based boards are not yet apparently. My assumption is that the AVR boards will eventually move to the standardized API as well although I didn't really dig into that. In the API the definitions of the requestFrom() function use a uint8_t and size_t type variables (linked and shown below). So I think the most compatible way to use the requestFrom function would be with those types. I'm no expert though so please help me out if I'm missing something here. https://github.com/arduino/ArduinoCore-API/blob/master/api/HardwareI2C.h
|
THE AVR platforms set the standards for Arduino. They were the first and only type of Arduino you could get for many years. If they change it, they will break sketches and libraries unless they add the mapping call. Currently today, AVR doesn't support that one; and neither does some other platforms, so right now the most common and the longest supported one is the one I am using. |
Describe the bug
IsDateTimeValid() causes a warning about ambiguous declaration. See below for error output. This can be seen with the DS3231_Simple.ino example script.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No warnings during compile.
Development environment (please complete the following information):
Minimal Sketch that reproduced the problem:
DS3231_Simple.ino
Additional context
Suggested fix:
Change the type cast to size_t on line 663 of RtcDS3231.h to match the "candidate 2" form of requestFrom().
The text was updated successfully, but these errors were encountered: