| 380 | |
| 381 | |
| 382 | void SerialFlashFile::erase() |
| 383 | { |
| 384 | uint32_t i, blocksize; |
| 385 | |
| 386 | blocksize = SerialFlash.blockSize(); |
| 387 | if (address & (blocksize - 1)) return; // must begin on a block boundary |
| 388 | if (length & (blocksize - 1)) return; // must be exact number of blocks |
| 389 | for (i=0; i < length; i += blocksize) { |
| 390 | SerialFlash.eraseBlock(address + i); |
| 391 | } |
| 392 | } |
| 393 |
nothing calls this directly
no test coverage detected