Fix broken hardware version detect. v1.3 is now correctly detected.

This commit is contained in:
Mario Hüttel 2021-01-01 17:28:38 +01:00
parent 87c372d871
commit c01b7a9825
2 changed files with 2 additions and 3 deletions

View File

@ -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) {

View File

@ -248,7 +248,6 @@ int main(void)
__WFI();
else
__NOP();
}
return 0;