Fix bug in uart, when compiled in release mode

This commit is contained in:
Mario Hüttel 2020-02-23 20:58:56 +01:00
parent c3ff199a09
commit e85a26d90b

View File

@ -66,7 +66,9 @@ void uart_disable()
UART_PERIPH->CR3 = 0; UART_PERIPH->CR3 = 0;
dma_ring_buffer_periph_to_mem_stop(&ring_buff_rx); dma_ring_buffer_periph_to_mem_stop(&ring_buff_rx);
dma_ring_buffer_mem_to_periph_stop(&ring_buff_tx); dma_ring_buffer_mem_to_periph_stop(&ring_buff_tx);
rcc_manager_disable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(UART_PORT_RCC_MASK)); #ifdef DEBUGBUILD
rcc_manager_disable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(UART_PORT_RCC_MASK));
#endif
rcc_manager_disable_clock(&RCC->APB2ENR, BITMASK_TO_BITNO(UART_RCC_MASK)); rcc_manager_disable_clock(&RCC->APB2ENR, BITMASK_TO_BITNO(UART_RCC_MASK));
} }