未验证 提交 634e5341 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #5120 from mysterywolf/ab32

[ab32vg1] 修复NULL和uint8报错
...@@ -138,6 +138,7 @@ jobs: ...@@ -138,6 +138,7 @@ jobs:
- {RTT_BSP: "raspberry-pi/raspi4-32", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "raspberry-pi/raspi4-32", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "hc32l196", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "hc32l196", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "tae32f5300", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "tae32f5300", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "bluetrum/ab32vg1-ab-prougen", RTT_TOOL_CHAIN: "sourcery-riscv"}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python - name: Set up Python
......
...@@ -19,27 +19,27 @@ void uart1_irq_process(void); ...@@ -19,27 +19,27 @@ void uart1_irq_process(void);
RT_SECTION(".irq.uart") RT_SECTION(".irq.uart")
void uart0_irq_post(void) void uart0_irq_post(void)
{ {
uint8_t mq_msg = MSG_UART0_IRQ; rt_uint8_t mq_msg = MSG_UART0_IRQ;
rt_mq_send(drv_mq, &mq_msg, 1); rt_mq_send(drv_mq, &mq_msg, 1);
} }
RT_SECTION(".irq.uart") RT_SECTION(".irq.uart")
void uart1_irq_post(void) void uart1_irq_post(void)
{ {
uint8_t mq_msg = MSG_UART1_IRQ; rt_uint8_t mq_msg = MSG_UART1_IRQ;
rt_mq_send(drv_mq, &mq_msg, 1); rt_mq_send(drv_mq, &mq_msg, 1);
} }
RT_SECTION(".irq.uart") RT_SECTION(".irq.uart")
void uart2_irq_post(void) void uart2_irq_post(void)
{ {
uint8_t mq_msg = MSG_UART2_IRQ; rt_uint8_t mq_msg = MSG_UART2_IRQ;
rt_mq_send(drv_mq, &mq_msg, 1); rt_mq_send(drv_mq, &mq_msg, 1);
} }
static void drv_thread_entry(void *parameter) static void drv_thread_entry(void *parameter)
{ {
uint8_t mq_msg = 0; rt_uint8_t mq_msg = 0;
while (1) { while (1) {
rt_mq_recv(drv_mq, &mq_msg, 1, RT_WAITING_FOREVER); rt_mq_recv(drv_mq, &mq_msg, 1, RT_WAITING_FOREVER);
switch (mq_msg) { switch (mq_msg) {
......
...@@ -324,7 +324,7 @@ int rt_hw_usart_init(void) ...@@ -324,7 +324,7 @@ int rt_hw_usart_init(void)
| RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_INT_RX
| RT_DEVICE_FLAG_INT_TX | RT_DEVICE_FLAG_INT_TX
| uart_obj[i].uart_dma_flag | uart_obj[i].uart_dma_flag
, NULL); , RT_NULL);
RT_ASSERT(result == RT_EOK); RT_ASSERT(result == RT_EOK);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册