mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Use transferBytes when we want to receive data
This commit is contained in:
parent
231fb542a8
commit
6af321a7ac
1 changed files with 2 additions and 2 deletions
|
@ -332,11 +332,11 @@ uint8_t* MAX3421e< SPI_SS, INTR >::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t*
|
|||
SPI.transfer(reg);
|
||||
memset(data_p, 0, nbytes); // Make sure we send out empty bytes
|
||||
#ifdef ESP8266
|
||||
SPI.writeBytes(data_p, nbytes);
|
||||
SPI.transferBytes(data_p, data_p, nbytes);
|
||||
#else
|
||||
SPI.transfer(data_p, nbytes);
|
||||
#endif
|
||||
data_p += nbytes;
|
||||
#endif
|
||||
#elif defined(__ARDUINO_X86__)
|
||||
SPI.transfer(reg);
|
||||
SPI.transferBuffer(NULL, data_p, nbytes);
|
||||
|
|
Loading…
Reference in a new issue