Skip to content

Commit e12e42c

Browse files
committed
[bsp/hc32]hc32f460 doesn't support CAN-FD, hc32_ll_can.h has no some definations.
1 parent 00fb41f commit e12e42c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bsp/hc32/libraries/hc32_drivers/drv_can.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ static uint8_t _get_can_data_bytes_len(uint32_t dlc)
325325
{
326326
data_bytes = dlc;
327327
}
328+
#ifdef RT_CAN_USING_CANFD
328329
else
329330
{
330331
switch (dlc)
@@ -355,6 +356,7 @@ static uint8_t _get_can_data_bytes_len(uint32_t dlc)
355356
break;
356357
}
357358
}
359+
#endif
358360

359361
return data_bytes;
360362
}

0 commit comments

Comments
 (0)