/* Checks whether the specified CAN flag is set or not.  */
FlagStatus CAN_GetFlagStatus(CAN_TypeDef *can, u32 flag)
/* Checks whether the specified CAN flag is set or not.  */
FlagStatus CAN_GetFlagStatus(CAN_TypeDef *can, u32 flag)
{
    return (FlagStatus)(((can->SR & flag) == flag) ? SET : RESET);
}