diff options
| author | Zixun LI <[email protected]> | 2026-05-03 14:36:25 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-05-03 14:36:25 +0200 |
| commit | ea2de8be7e939fdffd73efd75cc2e2051ca495a9 (patch) | |
| tree | f2801e76d9643eb277ba49498f0fedeee9aa2e6b /hw | |
| parent | 5c0c1662464e48681533e8ecc1217613fb6e3820 (diff) | |
| parent | 939c2f91c200db2bf9874c2e6c50b3530f8a6725 (diff) | |
Merge branch 'master' into copilot/upgrade-net-lwip-webserver-descriptors
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/tm4c/family.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/bsp/tm4c/family.c b/hw/bsp/tm4c/family.c index fe4737e50..4f85be220 100644 --- a/hw/bsp/tm4c/family.c +++ b/hw/bsp/tm4c/family.c @@ -58,6 +58,14 @@ static void board_button_init(GPIOA_Type* port, uint8_t PinMsk) { /* Set direction */ port->DIR &= ~PinMsk; + + /* Enable internal pull so the idle state is deterministic. LaunchPad buttons + * connect the pin to GND when pressed (active-low) and require a pull-up. */ +#if BUTTON_STATE_ACTIVE == 0 + port->PUR |= PinMsk; +#else + port->PDR |= PinMsk; +#endif } static void board_led_init(GPIOA_Type* port, uint8_t PinMsk, uint8_t dirmsk) { |
