Fixed Arduino SPI/Ethernet compile issue as described in issue #1623 (#2136)

* #1623, implementing suggested change

Splitted suggested fix issue #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.

* #1623, implementing suggested change SPI.h/cpp

Splitted suggested fix issue #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.
This commit is contained in:
Arjan Filius 2018-12-02 18:15:01 +01:00 committed by Me No Dev
parent f644d9d157
commit b5f317010c
2 changed files with 7 additions and 1 deletions

View File

@ -214,6 +214,11 @@ void SPIClass::writeBytes(uint8_t * data, uint32_t size)
spiEndTransaction(_spi); spiEndTransaction(_spi);
} }
void SPIClass::transfer(uint8_t * data, uint32_t size)
{
transferBytes(data, data, size);
}
/** /**
* @param data void * * @param data void *
* @param size uint32_t * @param size uint32_t

View File

@ -65,10 +65,11 @@ public:
void beginTransaction(SPISettings settings); void beginTransaction(SPISettings settings);
void endTransaction(void); void endTransaction(void);
void transfer(uint8_t * data, uint32_t size);
uint8_t transfer(uint8_t data); uint8_t transfer(uint8_t data);
uint16_t transfer16(uint16_t data); uint16_t transfer16(uint16_t data);
uint32_t transfer32(uint32_t data); uint32_t transfer32(uint32_t data);
void transferBytes(uint8_t * data, uint8_t * out, uint32_t size); void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
void transferBits(uint32_t data, uint32_t * out, uint8_t bits); void transferBits(uint32_t data, uint32_t * out, uint8_t bits);