mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

Mx25v8035f flash write routines should not update buffers #293

Closed terrillmoore closed 3 years ago

terrillmoore commented 3 years ago

Due to severe limitations in the Arduino SPI API, the Catena_Mv25v8035f::program() routine not only takes a writable buffer as input, but actually modifies it with the data shifted in from the SPI bus while writing.

Change to use a bounce buffer. (Longer term, add an API like the bootloader's, which stuffs zeroes if TX buffer pointer is NULL and discards input if RX buffer pointer is NULL.)