Skip to content

Commit

Permalink
this
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jan 29, 2018
1 parent 8b7e849 commit a9f6bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion board/drivers/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void uart_dma_drain() {

enter_critical_section();

if (DMA2_Stream5->NDTR != USART1_DMA_LEN) {
if (DMA2->HISR & DMA_HISR_TCIF5 || DMA2->HISR & DMA_HISR_HTIF5 || DMA2_Stream5->NDTR != USART1_DMA_LEN) {
// disable DMA
//q->uart->CR3 &= ~USART_CR3_DMAR;
DMA2_Stream5->CR &= ~DMA_SxCR_EN;
Expand Down

0 comments on commit a9f6bf0

Please sign in to comment.