Skip to content

Commit

Permalink
Support bootloader version 3 in command offset 0x8E (#55)
Browse files Browse the repository at this point in the history
* Offset 0x8E to return bootloader 3 version

* Fix typo

* Change order; look for bootloader 3 first

* Revert code, check bootloader version at 0x1e00 first

* Fix bug that I introduced
  • Loading branch information
stefan-b-jakobsson authored Oct 30, 2024
1 parent 6541fc0 commit 70e3a59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x16-smc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,13 @@ void I2C_Send() {

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) {
// From bootloader version 3
smcWire.write(pgm_read_byte(0x1fff));
}
else {
smcWire.write(0xff);
}
Expand Down

0 comments on commit 70e3a59

Please sign in to comment.