[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:
parent
e25fc8b511
commit
194fd6df05
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue