summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-04-21 19:44:10 +0700
committerhathach <[email protected]>2026-04-21 19:44:10 +0700
commitd0c550cadceff3fdf30060f4ac0ebf919e5934a1 (patch)
tree74118fd0fd1b10095773d848fbe8d814535ae937 /hw
parent100cfd6360ddd0c94a0aaeaa2da05449c0648dc1 (diff)
enable double buffer for tm4c
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/tm4c/family.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/bsp/tm4c/family.c b/hw/bsp/tm4c/family.c
index 6988a264e..c5e4bd64e 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) {