Skip to content

Commit b5f3170

Browse files
iafiliusme-no-dev
authored andcommitted
Fixed Arduino SPI/Ethernet compile issue as described in issue espressif#1623 (espressif#2136)
* espressif#1623, implementing suggested change Splitted suggested fix issue espressif#1623 in a header and source part. Dit not completely dive into the code. Giving data twice as parameter feels wrong, but it compiles, and i can succesfully use the W5500 with SPI with this fix. Doesn't compile without. * espressif#1623, implementing suggested change SPI.h/cpp Splitted suggested fix issue espressif#1623 in a header and source part. Dit not completely dive into the code. Giving data twice as parameter feels wrong, but it compiles, and i can succesfully use the W5500 with SPI with this fix. Doesn't compile without.
1 parent f644d9d commit b5f3170

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: libraries/SPI/src/SPI.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ void SPIClass::writeBytes(uint8_t * data, uint32_t size)
214214
spiEndTransaction(_spi);
215215
}
216216

217+
void SPIClass::transfer(uint8_t * data, uint32_t size)
218+
{
219+
transferBytes(data, data, size);
220+
}
221+
217222
/**
218223
* @param data void *
219224
* @param size uint32_t

Diff for: libraries/SPI/src/SPI.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ class SPIClass
6565

6666
void beginTransaction(SPISettings settings);
6767
void endTransaction(void);
68-
68+
void transfer(uint8_t * data, uint32_t size);
6969
uint8_t transfer(uint8_t data);
7070
uint16_t transfer16(uint16_t data);
7171
uint32_t transfer32(uint32_t data);
72+
7273
void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
7374
void transferBits(uint32_t data, uint32_t * out, uint8_t bits);
7475

0 commit comments

Comments
 (0)