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; \ } \