diff --git a/flight/PiOS/STM32F10x/pios_usart.c b/flight/PiOS/STM32F10x/pios_usart.c index 1c087738c..176992cb9 100644 --- a/flight/PiOS/STM32F10x/pios_usart.c +++ b/flight/PiOS/STM32F10x/pios_usart.c @@ -180,9 +180,15 @@ int32_t PIOS_USART_Init(uint32_t * usart_id, const struct pios_usart_cfg * cfg) /* Configure USART Interrupts */ switch ((uint32_t)usart_dev->cfg->regs) { - case (uint32_t)USART1: PIOS_USART_1_id = (uint32_t)usart_dev; - case (uint32_t)USART2: PIOS_USART_2_id = (uint32_t)usart_dev; - case (uint32_t)USART3: PIOS_USART_3_id = (uint32_t)usart_dev; + case (uint32_t)USART1: + PIOS_USART_1_id = (uint32_t)usart_dev; + break; + case (uint32_t)USART2: + PIOS_USART_2_id = (uint32_t)usart_dev; + break; + case (uint32_t)USART3: + PIOS_USART_3_id = (uint32_t)usart_dev; + break; } NVIC_Init(&usart_dev->cfg->irq.init); USART_ITConfig(usart_dev->cfg->regs, USART_IT_RXNE, ENABLE);