diff options
| author | Fan Yang <[email protected]> | 2022-08-14 10:59:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-13 22:59:28 -0400 |
| commit | 666af5e29d04b46f4b88cd10eed0ddee8f9103aa (patch) | |
| tree | 541b2a119ce5c5360e5db7ed6609a8b8d8229272 /bsp/stm32/libraries | |
| parent | 0189987d91f70f664b6b3d09c7f3bb7fbe105716 (diff) | |
[DeviceDriver] Add CANFD support and correct typos (#5912)
* Add CANFD support and correct typos
- Added CANFD required fields to can.h
- Fixed typos in can.h and can.c
- Corrected all the projects affected by the typo
- Fixed wrong line-ending in some affected can driver files
Signed-off-by: Fan YANG <[email protected]>
* update
Signed-off-by: Fan YANG <[email protected]>
Co-authored-by: Meco Man <[email protected]>
Diffstat (limited to 'bsp/stm32/libraries')
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drv_can.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_can.c b/bsp/stm32/libraries/HAL_Drivers/drv_can.c index a3959a2083..1cb003bdf4 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_can.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_can.c @@ -149,13 +149,13 @@ static rt_err_t _can_config(struct rt_can_device *can, struct can_configure *cfg case RT_CAN_MODE_NORMAL: drv_can->CanHandle.Init.Mode = CAN_MODE_NORMAL; break; - case RT_CAN_MODE_LISEN: + case RT_CAN_MODE_LISTEN: drv_can->CanHandle.Init.Mode = CAN_MODE_SILENT; break; case RT_CAN_MODE_LOOPBACK: drv_can->CanHandle.Init.Mode = CAN_MODE_LOOPBACK; break; - case RT_CAN_MODE_LOOPBACKANLISEN: + case RT_CAN_MODE_LOOPBACKANLISTEN: drv_can->CanHandle.Init.Mode = CAN_MODE_SILENT_LOOPBACK; break; } @@ -410,9 +410,9 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg) case RT_CAN_CMD_SET_MODE: argval = (rt_uint32_t) arg; if (argval != RT_CAN_MODE_NORMAL && - argval != RT_CAN_MODE_LISEN && + argval != RT_CAN_MODE_LISTEN && argval != RT_CAN_MODE_LOOPBACK && - argval != RT_CAN_MODE_LOOPBACKANLISEN) + argval != RT_CAN_MODE_LOOPBACKANLISTEN) { return -RT_ERROR; } |
