Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [CAN][STM32] GCC compile errors. #9830

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bsp/stm32/libraries/HAL_Drivers/drivers/drv_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static rt_err_t _can_config(struct rt_can_device *can, struct can_configure *cfg

/* default filter config */
HAL_CAN_ConfigFilter(&drv_can->CanHandle, &drv_can->FilterConfig);

return RT_EOK;
}

Expand Down Expand Up @@ -456,6 +456,7 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
}
break;
case RT_CAN_CMD_GET_STATUS:
{
rt_uint32_t errtype;
errtype = drv_can->CanHandle.Instance->ESR;
drv_can->device.status.rcverrcnt = errtype >> 24;
Expand All @@ -465,6 +466,7 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)

rt_memcpy(arg, &drv_can->device.status, sizeof(drv_can->device.status));
break;
}
case RT_CAN_CMD_START:
argval = (rt_uint32_t) arg;
if (argval == 0)
Expand Down
Loading