Set SPI_HAS_TRANSACTION to 1 and implement buffer transfer#2639
Set SPI_HAS_TRANSACTION to 1 and implement buffer transfer#2639Lauszus wants to merge 2 commits into
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. |
|
and this macro too. |
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.