Browse Source

Fix 32 bit shift on 8 bit AVR

main
PaulStoffregen 9 years ago
parent
commit
a5d84ba5dc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      SerialFlashDirectory.cpp

+ 1
- 1
SerialFlashDirectory.cpp View File

if (sig[0] == 0xFA96554C) return sig[1]; if (sig[0] == 0xFA96554C) return sig[1];
if (sig[0] == 0xFFFFFFFF) { if (sig[0] == 0xFFFFFFFF) {
sig[0] = 0xFA96554C; sig[0] = 0xFA96554C;
sig[1] = ((DEFAULT_STRINGS_SIZE/4) << 16) | DEFAULT_MAXFILES;
sig[1] = ((uint32_t)(DEFAULT_STRINGS_SIZE/4) << 16) | DEFAULT_MAXFILES;
SerialFlash.write(0, sig, 8); SerialFlash.write(0, sig, 8);
while (!SerialFlash.ready()) ; // TODO: timeout while (!SerialFlash.ready()) ; // TODO: timeout
SerialFlash.read(0, sig, 8); SerialFlash.read(0, sig, 8);

Loading…
Cancel
Save