Skip to content

Commit

Permalink
[WIRED] Fixed auto detection of certain wired adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
pdaehne authored and darthcloud committed Feb 23, 2024
1 parent b78459b commit 91fcf52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/wired/detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static const uint8_t system_id_high[][4] = {
static void detect_system(const uint32_t io, const uint8_t (*system_id)[4], const uint8_t *detect_pin) {
if (wired_adapter.system_id <= WIRED_AUTO) {
for (uint32_t i = 0; i < 4; i++) {
if (io & BIT(detect_pin[i] - 32)) {
if (io & BIT(detect_pin[i] & 0x1F)) {
if (GPIO.in1.val & BIT(ALT_SYS_PIN - 32)) {
wired_adapter.system_id = system_id[0][i];
}
Expand Down

0 comments on commit 91fcf52

Please sign in to comment.