Skip to content

Commit 1147bab

Browse files
committed
Update uart0.cpp
1 parent 8c2341b commit 1147bab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib-gd32/src/uart0/uart0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern "C" void USART0_IRQHandler() {
5656
if (RESET != usart_interrupt_flag_get(USART0, USART_INT_FLAG_IDLE)) {
5757
usart_data_receive(USART0);
5858

59-
sv_rx_count.rx = kSizeRxBuffer - (dma_transfer_number_get(USART0_DMAx, USART0_RX_DMA_CHx));
59+
sv_rx_count.rx = static_cast<uint16_t>(kSizeRxBuffer - (dma_transfer_number_get(USART0_DMAx, USART0_RX_DMA_CHx)));
6060
sv_receive_flag = 1;
6161

6262
auto chtl = DMA_CHCTL(USART0_DMAx, USART0_RX_DMA_CHx);

0 commit comments

Comments
 (0)