power panic: read whole directory name block from EEPROM
There is no need to read one byte at a time. We can simply read the whole block in one go. This saves some flash memory. Change in memory: Flash: -18 bytes SRAM: 0 bytes
This commit is contained in:
parent
21d0130626
commit
4c52d92d16
|
|
@ -431,9 +431,7 @@ void restore_file_from_sd()
|
|||
uint8_t depth = eeprom_read_byte((uint8_t*)EEPROM_DIR_DEPTH);
|
||||
|
||||
for (uint8_t i = 0; i < depth; i++) {
|
||||
for (uint8_t j = 0; j < 8; j++) {
|
||||
dir_name[j] = eeprom_read_byte((uint8_t*)EEPROM_DIRS + j + 8 * i);
|
||||
}
|
||||
eeprom_read_block(dir_name, (const char *)EEPROM_DIRS + 8 * i, 8);
|
||||
dir_name[8] = '\0';
|
||||
card.chdir(dir_name, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue