PaulStoffregen 8 years ago
parent
commit
c9c66e24b9
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      SerialFlashChip.cpp

+ 1
- 0
SerialFlashChip.cpp View File

max = 256 - (addr & 0xFF); max = 256 - (addr & 0xFF);
pagelen = (len <= max) ? len : max; pagelen = (len <= max) ? len : max;
//Serial.printf("WR: addr %08X, pagelen %d\n", addr, pagelen); //Serial.printf("WR: addr %08X, pagelen %d\n", addr, pagelen);
delayMicroseconds(1); // TODO: reduce this, but prefer safety first
CSASSERT(); CSASSERT();
if (flags & FLAG_32BIT_ADDR) { if (flags & FLAG_32BIT_ADDR) {
SPI.transfer(0x02); // program page command SPI.transfer(0x02); // program page command

Loading…
Cancel
Save