From 087d20b22c5cdc36591bf7eccccf1564e7a6e2f1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Apr 2019 16:58:59 +1000 Subject: [PATCH] HAL_ChibiOS: mark SDIO and SDMMC IO as pullup this is needed for boards such as PixhackV3 which don't have hardware pullups. Thanks to Hongle for reporting this. --- .../AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 1eb67ff67e..79dff51bee 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -241,6 +241,7 @@ class generic_pin(object): v = 'FLOATING' if self.is_CS(): v = "PULLUP" + # generate pullups for UARTs if (self.type.startswith('USART') or self.type.startswith('UART')) and ( (self.label.endswith('_TX') or @@ -248,6 +249,15 @@ class generic_pin(object): self.label.endswith('_CTS') or self.label.endswith('_RTS'))): v = "PULLUP" + # generate pullups for SDIO and SDMMC + if (self.type.startswith('SDIO') or + self.type.startswith('SDMMC')) and ( + (self.label.endswith('_D0') or + self.label.endswith('_D1') or + self.label.endswith('_D2') or + self.label.endswith('_D3') or + self.label.endswith('_CMD'))): + v = "PULLUP" for e in self.extra: if e in values: v = e