Fix HardwareSerial::flush()

This commit is contained in:
edogaldo 2016-07-18 11:49:46 +02:00
parent 3a5f8cfc1b
commit 7ba9065895
2 changed files with 2 additions and 1 deletions

View File

@ -194,4 +194,5 @@ size_t HardwareSerial::write(unsigned char ch) {
void HardwareSerial::flush(void) {
usart_reset_rx(this->usart_device);
usart_reset_tx(this->usart_device);
}

View File

@ -396,7 +396,7 @@ typedef struct usart_dev {
* Actual RX buffer used by rb.
* This field will be removed in
* a future release. */
uint8 tx_buf[USART_TX_BUF_SIZE]; /* Actual TX buffer used by wb */
uint8 tx_buf[USART_TX_BUF_SIZE]; /**< Actual TX buffer used by wb */
rcc_clk_id clk_id; /**< RCC clock information */
nvic_irq_num irq_num; /**< USART NVIC interrupt */
} usart_dev;