[bsp/at32] 1.fixed f402 uart7/8 pierph clock source error, 2.fixed compiling error of drv_usart_v2.c with no dma

This commit is contained in:
sheltonyu 2024-05-16 17:44:02 +08:00 committed by Meco Man
parent e25fc8b511
commit 194fd6df05
2 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,7 @@ void usart_init(usart_type* usart_x, uint32_t baud_rate, usart_data_bit_num_type
crm_clocks_freq_type clocks_freq;
uint32_t apb_clock, temp_val;
crm_clocks_freq_get(&clocks_freq);
if((usart_x == USART1) || (usart_x == USART6) || (usart_x == UART7) || (usart_x == UART8))
if((usart_x == USART1) || (usart_x == USART6))
{
apb_clock = clocks_freq.apb2_freq;
}

View File

@ -398,7 +398,9 @@ static rt_ssize_t at32_transmit(struct rt_serial_device *serial, rt_uint8_t *buf
if(instance->uart_dma_flag & RT_DEVICE_FLAG_DMA_TX)
{
#ifdef RT_SERIAL_USING_DMA
_uart_dma_transmit(instance, buf, size);
#endif
return size;
}