Explicit cast the data to an uint8_t pointer

It is then cast back to uint32_t in the SPI library: 40c159fcf5/libraries/SPI/SPI.cpp (L402)
This commit is contained in:
Kristian Sloth Lauszus 2017-06-13 12:18:40 +02:00
parent a68614a2e8
commit 453a4e1f7f

View file

@ -181,7 +181,7 @@ void MAX3421e< SPI_SS, INTR >::regWr(uint8_t reg, uint8_t data) {
uint32_t c[2]; // The data needs to be aligned to 32-bit
c[0] = reg | 0x02;
c[1] = data;
SPI.writeBytes(c, 2);
SPI.writeBytes((uint8_t*)c, 2);
#else
uint8_t c[2];
c[0] = reg | 0x02;