-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Compilation fails with recent Wire.h changes #5287
Comments
Also mentioned in cb05b86#comments, but suggested change is other way around - fix other args to |
* I2C slave support; resolving conflicts against current master * removed unused argument, updateded to hopefully pass Travis * cleaning up commit as requested by #5162 (review) * cleaning up commit as requested by #5162 (review) * type fix
Hi, I can confirm that the core is not compiling if using the core from cb05b86 and this wire library in a sketch. So, for example, Sonoff-Tasmota will not compile either under this commit. Also I can confirm that the fix proposed in the comments don't work either. The Arduino core stills not compile. Sorry. Please, if there is something else I can help, do not hesitate on asking. |
The correct arg type is in fact size_t, and not int, because the value can't be negative. At the very least, it needs to be unsigned. |
Hi, I can confirm that with the PR #5289, now the core compiles fine. Please, merge it. Thanks a lot for your work 👍 |
Basic Infos
Platform
Settings in IDE
Problem Description
Commit bfcbd71 from #5226 changed
twi_attachSlaveRxEvent
argument signature from..., int
to..., size_t
and now whenWire.h
is included compilation fails.Looking at arduino-avr variant,
cores/esp8266/twi.h
andcores/esp866/core_esp8266_si2c.c
seems to be in the wrong here and 'numBytes' should beint
instead ofsize_t
Arduino/libraries/Wire/Wire.cpp
Line 215 in cb05b86
Arduino/cores/esp8266/twi.h
Line 51 in cb05b86
Arduino/libraries/Wire/Wire.cpp
Line 84 in cb05b86
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: