Fix broken hardware version detect. v1.3 is now correctly detected.
This commit is contained in:
parent
87c372d871
commit
c01b7a9825
@ -27,8 +27,8 @@ enum hw_revision get_pcb_hardware_version(void)
|
|||||||
|
|
||||||
/* Loop again and read in the pin mask */
|
/* 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++) {
|
for (current_pin = HW_REV_DETECT_PIN_LOW; current_pin <= HW_REV_DETECT_PIN_HIGH; current_pin++) {
|
||||||
port_bitmask <<= 1;
|
port_bitmask >>= 1;
|
||||||
port_bitmask |= (HW_REV_DETECT_GPIO->IDR & (1 << current_pin)) ? 0x0 : 0x1;
|
port_bitmask |= (HW_REV_DETECT_GPIO->IDR & (1 << current_pin)) ? 0x0 : 0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (port_bitmask) {
|
switch (port_bitmask) {
|
||||||
|
@ -248,7 +248,6 @@ int main(void)
|
|||||||
__WFI();
|
__WFI();
|
||||||
else
|
else
|
||||||
__NOP();
|
__NOP();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user