mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_HAL_ChibiOS: GPIO: read: support virtual read of IOMCU pins
This commit is contained in:
parent
bafaffb07e
commit
d59b629e7f
@ -241,6 +241,11 @@ uint8_t GPIO::read(uint8_t pin)
|
|||||||
if (g) {
|
if (g) {
|
||||||
return palReadLine(g->pal_line);
|
return palReadLine(g->pal_line);
|
||||||
}
|
}
|
||||||
|
#if HAL_WITH_IO_MCU
|
||||||
|
if (AP_BoardConfig::io_enabled() && iomcu.valid_GPIO_pin(pin)) {
|
||||||
|
return iomcu.read_virtual_GPIO(pin);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user