Add ability to flash backup rom
This commit is contained in:
@ -82,8 +82,12 @@ static enum Result cmd_spi(void) {
|
||||
#ifdef __SCRATCH__
|
||||
uint8_t len = smfi_cmd[3];
|
||||
|
||||
// Enable chip (internal)
|
||||
ECINDAR3 = 0x7F;
|
||||
// Enable chip
|
||||
if (flags & CMD_SPI_FLAG_BACKUP) {
|
||||
ECINDAR3 = 0xFF;
|
||||
} else {
|
||||
ECINDAR3 = 0x7F;
|
||||
}
|
||||
ECINDAR2 = 0xFF;
|
||||
ECINDAR1 = 0xFD;
|
||||
ECINDAR0 = 0x00;
|
||||
|
@ -82,8 +82,12 @@ static enum Result cmd_spi(void) {
|
||||
#ifdef __SCRATCH__
|
||||
uint8_t len = smfi_cmd[3];
|
||||
|
||||
// Enable chip (internal)
|
||||
ECINDAR3 = 0x7F;
|
||||
// Enable chip
|
||||
if (flags & CMD_SPI_FLAG_BACKUP) {
|
||||
ECINDAR3 = 0xFF;
|
||||
} else {
|
||||
ECINDAR3 = 0x7F;
|
||||
}
|
||||
ECINDAR2 = 0xFF;
|
||||
ECINDAR1 = 0xFD;
|
||||
ECINDAR0 = 0x00;
|
||||
|
@ -82,8 +82,12 @@ static enum Result cmd_spi(void) {
|
||||
#ifdef __SCRATCH__
|
||||
uint8_t len = smfi_cmd[3];
|
||||
|
||||
// Enable chip (internal)
|
||||
ECINDAR3 = 0x7F;
|
||||
// Enable chip
|
||||
if (flags & CMD_SPI_FLAG_BACKUP) {
|
||||
ECINDAR3 = 0xFF;
|
||||
} else {
|
||||
ECINDAR3 = 0x7F;
|
||||
}
|
||||
ECINDAR2 = 0xFF;
|
||||
ECINDAR1 = 0xFD;
|
||||
ECINDAR0 = 0x00;
|
||||
|
@ -34,6 +34,8 @@ enum CommandSpiFlag {
|
||||
CMD_SPI_FLAG_DISABLE = (1 << 1),
|
||||
// Run firmware from scratch RAM if necessary
|
||||
CMD_SPI_FLAG_SCRATCH = (1 << 2),
|
||||
// Write to backup ROM instead
|
||||
CMD_SPI_FLAG_BACKUP = (1 << 3),
|
||||
};
|
||||
|
||||
#endif // _COMMON_COMMAND_H
|
||||
|
Reference in New Issue
Block a user