Skip to content

Commit

Permalink
Change order; look for bootloader 3 first
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-b-jakobsson committed Oct 13, 2024
1 parent 84e94d2 commit a4f4bfb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x16-smc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,14 @@ void I2C_Send() {
break;

case I2C_CMD_GET_BOOTLDR_VER:
if (pgm_read_byte(0x1e00) == 0x8a) {
// Bootloader version 1 and 2
smcWire.write(pgm_read_byte(0x1e01));
}
else if (pgm_read_byte(0x1ffe) == 0x8a) {
if (pgm_read_byte(0x1ffe) == 0x8a) {
// From bootloader version 3
smcWire.write(pgm_read_byte(0x1fff));
}
else if (pgm_read_byte(0x1e00) == 0x8a) {
// Bootloader version 1 and 2
smcWire.write(pgm_read_byte(0x1e01));
}
else {
smcWire.write(0xff);
}
Expand Down

0 comments on commit a4f4bfb

Please sign in to comment.