Skip to content

Commit

Permalink
AP_HAL_ChibiOS: GPIO: read: support virtual read of IOMCU pins
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 authored and tridge committed Jul 31, 2024
1 parent 60d579d commit 21ad679
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_HAL_ChibiOS/GPIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ uint8_t GPIO::read(uint8_t pin)
if (g) {
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;
}

Expand Down

0 comments on commit 21ad679

Please sign in to comment.