Skip to content

Commit 7ba9065

Browse files
committed
Fix HardwareSerial::flush()
1 parent 3a5f8cf commit 7ba9065

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

STM32F1/cores/maple/HardwareSerial.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,5 @@ size_t HardwareSerial::write(unsigned char ch) {
194194

195195
void HardwareSerial::flush(void) {
196196
usart_reset_rx(this->usart_device);
197+
usart_reset_tx(this->usart_device);
197198
}

STM32F1/system/libmaple/include/libmaple/usart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ typedef struct usart_dev {
396396
* Actual RX buffer used by rb.
397397
* This field will be removed in
398398
* a future release. */
399-
uint8 tx_buf[USART_TX_BUF_SIZE]; /* Actual TX buffer used by wb */
399+
uint8 tx_buf[USART_TX_BUF_SIZE]; /**< Actual TX buffer used by wb */
400400
rcc_clk_id clk_id; /**< RCC clock information */
401401
nvic_irq_num irq_num; /**< USART NVIC interrupt */
402402
} usart_dev;

0 commit comments

Comments
 (0)