From 16093369b28374cfd81bd2128c9d70aba637bc12 Mon Sep 17 00:00:00 2001 From: Lin-Chengqiu <1124266916@qq.com> Date: Thu, 19 Dec 2024 23:31:23 +0800 Subject: [PATCH] [bsp/hc32]hc32f460 doesn't support CAN-FD, hc32_ll_can.h has no some definations. --- bsp/hc32/libraries/hc32_drivers/drv_can.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsp/hc32/libraries/hc32_drivers/drv_can.c b/bsp/hc32/libraries/hc32_drivers/drv_can.c index 2274262aa8..61106abba7 100644 --- a/bsp/hc32/libraries/hc32_drivers/drv_can.c +++ b/bsp/hc32/libraries/hc32_drivers/drv_can.c @@ -325,6 +325,7 @@ static uint8_t _get_can_data_bytes_len(uint32_t dlc) { data_bytes = dlc; } +#ifdef RT_CAN_USING_CANFD else { switch (dlc) @@ -355,6 +356,7 @@ static uint8_t _get_can_data_bytes_len(uint32_t dlc) break; } } +#endif return data_bytes; }