/* : Select the Sleep mode or not in Peli workmode  */
void CAN_Peli_SleepMode_Cmd(CAN_TypeDef *CANx, FunctionalState NewState)
/* : Select the Sleep mode or not in Peli workmode  */
void CAN_Peli_SleepMode_Cmd(CAN_TypeDef *CANx, FunctionalState NewState)
{
        switch (*(uint32_t*)&CANx)
    {
        case CAN1_BASE:
            if(NewState == ENABLE)
                            CAN1_PELI->MOD |= CAN_SleepMode;
                        else
                            CAN1_PELI->MOD &= ~CAN_SleepMode;
            break;
                case CAN2_BASE:
            if(NewState == ENABLE)
                            CAN2_PELI->MOD |= CAN_SleepMode;
                        else
                            CAN2_PELI->MOD &= ~CAN_SleepMode;
            break;
        default:
            break;
    }
}