Similar to this issue it would be nice if the write method takes const uint8_t* instead of uint8_t*. i.e.
changing the method to
void write(uint32_t addr, const uint8_t *values, size_t count);
The underlying method SPIClass::transferBytes also takes const uint8_t*.
I understand this would require changing the code in the Adafruit_BusIO library as well but given Adafruit_I2CDevice write() already takes const pointers, it would be nice to be consistent and fix the Adafruit_SPIDevice as well.
https://github.com/adafruit/Adafruit_FRAM_SPI/blob/44f5b34c8172dafa34a6ab44cb526b7b705552d9/Adafruit_FRAM_SPI.h#L52
Similar to this issue it would be nice if the
write
method takesconst uint8_t*
instead ofuint8_t*
. i.e. changing the method tovoid write(uint32_t addr, const uint8_t *values, size_t count);
The underlying method
SPIClass::transferBytes
also takesconst uint8_t*
.I understand this would require changing the code in the Adafruit_BusIO library as well but given Adafruit_I2CDevice write() already takes const pointers, it would be nice to be consistent and fix the Adafruit_SPIDevice as well.
Can submit a PR if that works.