1.优化wch的uart驱动。

This commit is contained in:
MacRsh
2023-05-14 00:42:21 +08:00
parent e98152e9ff
commit 6f1afc8eac
2 changed files with 7 additions and 13 deletions

View File

@@ -10,10 +10,10 @@
#include <drv_uart.h>
#undef DRV_LOG_TAG
#define DRV_LOG_TAG "drv_uart"
#undef LOG_TAG
#define LOG_TAG "drv_uart"
#if (MR_DEVICE_SERIAL == MR_CONF_ENABLE)
#if (MR_CONF_DEVICE_SERIAL == MR_CONF_ENABLE)
enum
{
@@ -247,7 +247,7 @@ static mr_err_t ch32_serial_configure(mr_serial_t serial, struct mr_serial_confi
USART_Init(hw->hw_uart.Instance, &USART_InitStructure);
USART_Cmd(hw->hw_uart.Instance, ENABLE);
MR_LOG_E(DRV_LOG_TAG,
MR_LOG_D(LOG_TAG,
"%s %d %d %d\r\n",
hw->name,
config->baud_rate,
@@ -395,10 +395,4 @@ mr_err_t mr_hw_uart_init(void)
return MR_ERR_OK;
}
#endif
#endif

View File

@@ -13,7 +13,7 @@
#include <device/serial/serial.h>
#if (MR_DEVICE_SERIAL == MR_CONF_ENABLE)
#if (MR_CONF_DEVICE_SERIAL == MR_CONF_ENABLE)
#define CH32_UART_GPIO_REMAP_NONE 0
@@ -43,4 +43,4 @@ mr_err_t mr_hw_uart_init(void);
#endif
#endif
#endif