|
|
|
@ -79,11 +79,11 @@ void USART2_IRQHandler(void) {
|
|
|
|
rd = (rd + 1) & USART2_TXBUF_MASK; // new read index
|
|
|
|
rd = (rd + 1) & USART2_TXBUF_MASK; // new read index
|
|
|
|
USART2->DR = Usart2TxBuf[rd]; // send data byte
|
|
|
|
USART2->DR = Usart2TxBuf[rd]; // send data byte
|
|
|
|
Usart2TxRdIdx = rd; // Store new index
|
|
|
|
Usart2TxRdIdx = rd; // Store new index
|
|
|
|
|
|
|
|
}
|
|
|
|
if (wr == rd) { // data buffer empty
|
|
|
|
if (wr == rd) { // data buffer empty
|
|
|
|
USART2->CR1 &= ~USART_CR1_TXEIE; // INT disable
|
|
|
|
USART2->CR1 &= ~USART_CR1_TXEIE; // INT disable
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|