From 9eaeeb660c7bc0b42e942870845e0e38a60d7ec8 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Sun, 22 Sep 2019 09:36:32 +0300 Subject: [PATCH] Change the first argument of SPI::wrteBytes to be const (#3242) fixes: https://github.com/espressif/arduino-esp32/issues/3241 --- libraries/SPI/src/SPI.cpp | 2 +- libraries/SPI/src/SPI.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index 7891c416..7f297757 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -204,7 +204,7 @@ void SPIClass::transferBits(uint32_t data, uint32_t * out, uint8_t bits) * @param data uint8_t * * @param size uint32_t */ -void SPIClass::writeBytes(uint8_t * data, uint32_t size) +void SPIClass::writeBytes(const uint8_t * data, uint32_t size) { if(_inTransaction){ return spiWriteNL(_spi, data, size); diff --git a/libraries/SPI/src/SPI.h b/libraries/SPI/src/SPI.h index 6007cce8..e34833bd 100644 --- a/libraries/SPI/src/SPI.h +++ b/libraries/SPI/src/SPI.h @@ -76,7 +76,7 @@ public: void write(uint8_t data); void write16(uint16_t data); void write32(uint32_t data); - void writeBytes(uint8_t * data, uint32_t size); + void writeBytes(const uint8_t * data, uint32_t size); void writePixels(const void * data, uint32_t size);//ili9341 compatible void writePattern(uint8_t * data, uint8_t size, uint32_t repeat);