diff --git a/cpu/gd32v/include/periph_cpu.h b/cpu/gd32v/include/periph_cpu.h index ec6e437610..bec2001cb0 100644 --- a/cpu/gd32v/include/periph_cpu.h +++ b/cpu/gd32v/include/periph_cpu.h @@ -239,7 +239,7 @@ typedef union gpio_conf_gd32v gpio_conf_t; * @ingroup drivers_periph_gpio_ll */ union gpio_conf_gd32v { - uint16_t bits; /**< the raw bits */ + uint8_t bits; /**< the raw bits */ struct { /** * @brief State of the pin @@ -259,18 +259,6 @@ union gpio_conf_gd32v { * configured to @ref GPIO_OUTPUT_PUSH_PULL or @ref GPIO_OUTPUT_OPEN_DRAIN. */ gpio_slew_t slew_rate : 2; - /** - * @brief Whether to disable the input Schmitt trigger - * - * @details This could be called `schmitt_trigger` with inverse - * meaning, but the API contract says that additional - * members in the structure should have a sane - * default when zero. - * - * This value is ignored *unless* @ref gpio_conf_stm32::state is - * configured to @ref GPIO_INPUT. - */ - bool schmitt_trigger_disabled : 1; /** * @brief Initial value of the output * @@ -285,7 +273,6 @@ union gpio_conf_gd32v { * consulted. */ bool initial_value : 1; - uint8_t : 7; /*< padding */ }; }; diff --git a/cpu/gd32v/periph/gpio_ll.c b/cpu/gd32v/periph/gpio_ll.c index 375c010863..72de29352b 100644 --- a/cpu/gd32v/periph/gpio_ll.c +++ b/cpu/gd32v/periph/gpio_ll.c @@ -60,7 +60,6 @@ int gpio_ll_init(gpio_port_t port, uint8_t pin, gpio_conf_t conf) switch (conf.state) { case GPIO_DISCONNECT: - *ctrl |= 0x1 << (pos + 2); pin_used[GPIO_PORT_NUM(port)] &= ~(1 << pin); if (pin_used[GPIO_PORT_NUM(port)] == 0) { periph_clk_dis(APB2, (RCU_APB2EN_PAEN_Msk << GPIO_PORT_NUM(port))); @@ -121,14 +120,14 @@ gpio_conf_t gpio_ll_query_conf(gpio_port_t port, uint8_t pin) result.state = GPIO_INPUT; switch (ctrl) { case 0: - result.state = GPIO_USED_BY_PERIPHERAL; + result.state = GPIO_DISCONNECT; break; case 1: result.pull = GPIO_FLOATING; break; case 2: result.pull = (((GPIO_Type *)port)->OCTL & (1UL << pin)) ? GPIO_PULL_UP - : GPIO_PULL_DOWN; + : GPIO_PULL_DOWN; break; default: break; @@ -173,8 +172,4 @@ void gpio_ll_print_conf(gpio_conf_t conf) gpio_ll_print_conf_common(conf); print_str(", slew: "); print_str(slew_strs[conf.slew_rate]); - - if (conf.schmitt_trigger_disabled) { - print_str(", Schmitt trigger disabled"); - } }