summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorliuyucai <[email protected]>2025-07-29 10:15:03 +0800
committerRbb666 <[email protected]>2025-07-29 20:18:14 +0800
commita1c642aa3a2848b47f2a1b52679dc4ee5156f2f4 (patch)
treeedd3003ddc42ab49851e92167ce36050d1f15790 /components/drivers/include
parentc209173061e7cda3af75935b9a206835f63a7963 (diff)
[Fix] <components>:drivers/can/dev_can.c 修复CAN底层无法工作时导致调用 _can_int_tx 的线程一直挂起的问题
Solution: 使用 can->status.sndchange 的bit位来表示某个发送邮箱超时 如果超时 底层驱动再通知tx_done或者tx_fail事件时不予处理 Signed-off-by: Yucai Liu <[email protected]>
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/dev_can.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/drivers/include/drivers/dev_can.h b/components/drivers/include/drivers/dev_can.h
index 35755dead0..81ea0927ed 100644
--- a/components/drivers/include/drivers/dev_can.h
+++ b/components/drivers/include/drivers/dev_can.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2024 RT-Thread Development Team
+ * Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -21,6 +21,9 @@
#ifndef RT_CANSND_BOX_NUM
#define RT_CANSND_BOX_NUM 1
#endif
+#ifndef RT_CANSND_MSG_TIMEOUT
+#define RT_CANSND_MSG_TIMEOUT 100
+#endif
enum CAN_DLC
{
@@ -541,3 +544,4 @@ void rt_hw_can_isr(struct rt_can_device *can, int event);
/*! @}*/
#endif /*__DEV_CAN_H*/
+