/* Deinitializes the CAN peripheral registers to their default reset values.  */
void CAN_DeInit(CAN_Module *CANx)
/* Deinitializes the CAN peripheral registers to their default reset values.  */
void CAN_DeInit(CAN_Module *CANx)
{
    assert_param(IS_CAN_ALL_PERIPH(CANx));
    if (CANx == CAN1)
    {
        RCC_EnableAPB1PeriphReset(RCC_APB1_PERIPH_CAN1, ENABLE);
        RCC_EnableAPB1PeriphReset(RCC_APB1_PERIPH_CAN1, DISABLE);
    }
    else
    {
        RCC_EnableAPB1PeriphReset(RCC_APB1_PERIPH_CAN2, ENABLE);
        RCC_EnableAPB1PeriphReset(RCC_APB1_PERIPH_CAN2, DISABLE);
    }
}