-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Set SPI_HAS_TRANSACTION to 1 and implement buffer transfer #2639
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
Conversation
Current coverage is 27.80% (diff: 100%)@@ master #2639 diff @@
==========================================
Files 20 20
Lines 3625 3625
Methods 335 335
Messages 0 0
Branches 656 656
==========================================
Hits 1008 1008
Misses 2441 2441
Partials 176 176
|
Just a small comment. |
Thanks for your PR, but the core and libraries have changed enough that this PR now has a merge conflict. Could you merge it manually with the latest core, so we can consider it for future releases? |
1 similar comment
Thanks for your PR, but the core and libraries have changed enough that this PR now has a merge conflict. Could you merge it manually with the latest core, so we can consider it for future releases? |
Yeah, It's very simple. |
briefly, the patch is a one-liner. |
When implementing support for the ESP8266 in the USB Host library: felis/USB_Host_Shield_2.0#263 I noticed some differences compared to the standard Arduino core. This commit fixes that.
Note the data pointer is decreased by the data size in the buffer transfer, as transferBytes increments the pointer every time data is read: https://github.com/esp8266/Arduino/blob/master/libraries/SPI/SPI.cpp#L481.
Since I do not have a ESP8266 at hand I haven't tested these changes.
Also see: https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/libraries/SPI/src/SPI.h#L21, https://www.arduino.cc/en/Reference/SPITransfer, and https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/libraries/SPI/src/SPI.h#L244-L257 for reference.