https://forum.pjrc.com/threads/33328-Prop-Shield-Beta-Test?p=98553&viewfull=1#post98553main
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 |