diff --git a/stm-firmware/hw-version-detect.c b/stm-firmware/hw-version-detect.c index a29f829..3e7434a 100644 --- a/stm-firmware/hw-version-detect.c +++ b/stm-firmware/hw-version-detect.c @@ -27,8 +27,8 @@ enum hw_revision get_pcb_hardware_version(void) /* Loop again and read in the pin mask */ for (current_pin = HW_REV_DETECT_PIN_LOW; current_pin <= HW_REV_DETECT_PIN_HIGH; current_pin++) { - port_bitmask <<= 1; - port_bitmask |= (HW_REV_DETECT_GPIO->IDR & (1 << current_pin)) ? 0x0 : 0x1; + port_bitmask >>= 1; + port_bitmask |= (HW_REV_DETECT_GPIO->IDR & (1 << current_pin)) ? 0x0 : 0x80; } switch (port_bitmask) { diff --git a/stm-firmware/main.c b/stm-firmware/main.c index 4146ed1..1d4857b 100644 --- a/stm-firmware/main.c +++ b/stm-firmware/main.c @@ -248,7 +248,6 @@ int main(void) __WFI(); else __NOP(); - } return 0;