Write 1 byte to flash memory WARNING: you can only write to previously erased memory locations (see datasheet) use the block erase commands to first clear memory (write 0xFFs)
| 218 | /// WARNING: you can only write to previously erased memory locations (see datasheet) |
| 219 | /// use the block erase commands to first clear memory (write 0xFFs) |
| 220 | void SPIFlash::writeByte(uint32_t addr, uint8_t byt) { |
| 221 | command(SPIFLASH_BYTEPAGEPROGRAM, true); // Byte/Page Program |
| 222 | SPI.transfer(addr >> 16); |
| 223 | SPI.transfer(addr >> 8); |
| 224 | SPI.transfer(addr); |
| 225 | SPI.transfer(byt); |
| 226 | unselect(); |
| 227 | } |
| 228 | |
| 229 | /// write multiple bytes to flash memory (up to 64K) |
| 230 | /// WARNING: you can only write to previously erased memory locations (see datasheet) |
nothing calls this directly
no outgoing calls
no test coverage detected