From 170f1b32561459e8d6f9837baaa920f34294be91 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Tue, 16 Jul 2024 17:47:21 -0400 Subject: [PATCH] fix rushed copy/paste; DIR=0 disables the output, not DIR=1 --- common/hal_gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hal_gpio.h b/common/hal_gpio.h index b2d597b..7d99d1f 100644 --- a/common/hal_gpio.h +++ b/common/hal_gpio.h @@ -98,7 +98,7 @@ \ static inline void HAL_GPIO_##name##_off(void) \ { \ - PORT->Group[HAL_GPIO_PORT##port].DIRSET.reg = (1 << pin); \ + PORT->Group[HAL_GPIO_PORT##port].DIRCLR.reg = (1 << pin); \ PORT->Group[HAL_GPIO_PORT##port].PINCFG[pin].reg &= ~(PORT_PINCFG_PULLEN | PORT_PINCFG_INEN); \ (void)HAL_GPIO_##name##_off; \ } \