We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51d2d9e commit 3a5f8cfCopy full SHA for 3a5f8cf
1 file changed
STM32F1/cores/maple/libmaple/usart.c
@@ -70,6 +70,8 @@ void usart_disable(usart_dev *dev) {
70
/* FIXME this misbehaves (on F1) if you try to use PWM on TX afterwards */
71
usart_reg_map *regs = dev->regs;
72
73
+ while(!rb_is_empty(dev->wb))
74
+ ; // wait for TX completed
75
/* TC bit must be high before disabling the USART */
76
while((regs->CR1 & USART_CR1_UE) && !(regs->SR & USART_SR_TC))
77
;
0 commit comments