From 453a4e1f7f1211d3c04dd1823135163b89c8de5f Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 13 Jun 2017 12:18:40 +0200 Subject: [PATCH] Explicit cast the data to an uint8_t pointer It is then cast back to uint32_t in the SPI library: https://github.com/esp8266/Arduino/blob/40c159fcf5c5ecf9edec8e7ada49c82ece19e6d0/libraries/SPI/SPI.cpp#L402 --- usbhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbhost.h b/usbhost.h index e5eecbb1..e434ed7d 100644 --- a/usbhost.h +++ b/usbhost.h @@ -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;