Skip to content

Commit

Permalink
ok that doesn't hurt i think
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jan 29, 2018
1 parent a9f6bf0 commit be99ffc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions board/drivers/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void uart_dma_drain() {

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;
q->uart->CR3 &= ~USART_CR3_DMAR;
DMA2_Stream5->CR &= ~DMA_SxCR_EN;
while (DMA2_Stream5->CR & DMA_SxCR_EN);

Expand All @@ -194,7 +194,7 @@ void uart_dma_drain() {

// enable DMA
DMA2_Stream5->CR |= DMA_SxCR_EN;
//q->uart->CR3 |= USART_CR3_DMAR;
q->uart->CR3 |= USART_CR3_DMAR;
}

exit_critical_section();
Expand Down

0 comments on commit be99ffc

Please sign in to comment.