54 void configureOutput(uint32_t pull = GPIO_NOPULL,
bool opendrain =
false, uint32_t speed = GPIO_SPEED_FREQ_LOW){
55 GPIO_InitTypeDef GPIO_InitStruct = {0};
56 GPIO_InitStruct.Pin =
pin;
57 GPIO_InitStruct.Mode = opendrain ? GPIO_MODE_OUTPUT_OD : GPIO_MODE_OUTPUT_PP;
58 GPIO_InitStruct.Pull = pull;
59 GPIO_InitStruct.Speed = speed;
60 HAL_GPIO_Init(
port, &GPIO_InitStruct);