diff options
| author | cmbjxxiao <[email protected]> | 2023-06-07 18:22:25 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2023-08-18 23:33:20 -0400 |
| commit | 6dd3802d0a91d85e3910488898321c235fa3fe77 (patch) | |
| tree | ac84192d19d1a4489759f33e2d46800572b22ecd | |
| parent | 2917180c216cf31c44bfad7a069cac6ba54ed9aa (diff) | |
[components][drivers][can]Init can tx completion flag before tx
| -rw-r--r-- | components/drivers/can/can.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/drivers/can/can.c b/components/drivers/can/can.c index 63b738b2c5..a6c23d8f76 100644 --- a/components/drivers/can/can.c +++ b/components/drivers/can/can.c @@ -154,6 +154,7 @@ rt_inline int _can_int_tx(struct rt_can_device *can, const struct rt_can_msg *da no = ((rt_uint32_t)tx_tosnd - (rt_uint32_t)tx_fifo->buffer) / sizeof(struct rt_can_sndbxinx_list); tx_tosnd->result = RT_CAN_SND_RESULT_WAIT; + rt_completion_init(&tx_tosnd->completion); if (can->ops->sendmsg(can, data, no) != RT_EOK) { /* send failed. */ |
