mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-05 15:23:03 +08:00
[bsp/nxp/mcx/mcxa] Fix UART clock configuration type mismatch
Some checks failed
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Some checks failed
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Fixed implicit type conversion warning in UART driver by correctly separating clock_name_t and clock_attach_id_t enum types. Changes: - Use kCLOCK_Fro12M (clock_name_t) for clock_src field - Keep kFRO12M_to_LPUARTx (clock_attach_id_t) for clock_attach_id field - Fix mcx_getc() to use correct status flag kLPUART_RxDataRegFullFlag This resolves the compiler warning: "implicit conversion from 'int' to 'clock_name_t' changes value from 16777216 to 0" Signed-off-by: Yucai Liu 1486344514@qq.com
This commit is contained in:
@@ -64,12 +64,12 @@ static const struct mcx_uart uarts[] =
|
||||
&serial0,
|
||||
LPUART0,
|
||||
LPUART0_IRQn,
|
||||
kCLOCK_Fro12M,
|
||||
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
|
||||
kFRO_LF_DIV_to_LPUART0,
|
||||
#else
|
||||
kFRO12M_to_LPUART0,
|
||||
#endif
|
||||
kFRO12M_to_LPUART0,
|
||||
kCLOCK_GateLPUART0,
|
||||
kCLOCK_DivLPUART0,
|
||||
"uart0",
|
||||
@@ -80,12 +80,12 @@ static const struct mcx_uart uarts[] =
|
||||
&serial1,
|
||||
LPUART1,
|
||||
LPUART1_IRQn,
|
||||
kCLOCK_Fro12M,
|
||||
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
|
||||
kFRO_LF_DIV_to_LPUART1,
|
||||
#else
|
||||
kFRO12M_to_LPUART1,
|
||||
#endif
|
||||
kFRO12M_to_LPUART1,
|
||||
kCLOCK_GateLPUART1,
|
||||
kCLOCK_DivLPUART1,
|
||||
"uart1",
|
||||
@@ -182,7 +182,7 @@ static int mcx_getc(struct rt_serial_device *serial)
|
||||
{
|
||||
struct mcx_uart *uart = (struct mcx_uart *)serial->parent.user_data;
|
||||
|
||||
if (kLPUART_RxDataRegFullInterruptEnable & LPUART_GetStatusFlags(uart->uart_base))
|
||||
if (kLPUART_RxDataRegFullFlag & LPUART_GetStatusFlags(uart->uart_base))
|
||||
{
|
||||
return LPUART_ReadByte(uart->uart_base);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user