From a4f4bfbe34b833a9a839ebd20affb8d7478ca938 Mon Sep 17 00:00:00 2001 From: stefan-b-jakobsson Date: Sun, 13 Oct 2024 22:35:34 +0300 Subject: [PATCH] Change order; look for bootloader 3 first --- x16-smc.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x16-smc.ino b/x16-smc.ino index cee0f1e..2a381c2 100644 --- a/x16-smc.ino +++ b/x16-smc.ino @@ -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); }