/* : Select the Sleep mode or not in Basic workmode  */
uint8_t CAN_Sleep(CAN_TypeDef *CANx)
/* : Select the Sleep mode or not in Basic workmode  */
uint8_t CAN_Sleep(CAN_TypeDef *CANx)
{
    uint8_t sleepstatus = CANSLEEPFAILED;
    assert_param(IS_CAN_ALL_PERIPH(CANx));
    CANx->CMR |= CAN_SleepMode;
    if((CANx->CMR & 0x10) == CAN_SleepMode)
    {
        sleepstatus =  CANSLEEPOK;
    }
    return (uint8_t)sleepstatus;
}