libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_can.c
/**
  * @brief  Deinitializes the CAN peripheral registers to their default reset values.
  * @param  CANx: where x can be 1 or 2 to select the CAN peripheral.
  * @retval None.
  */
@brief  Deinitializes the CAN peripheral registers to their default reset values.
@param  CANx: where x can be 1 or 2 to select the CAN peripheral.
@retval None.
@brief Deinitializes the CAN peripheral registers to their default reset values . @param CANx : where x can be 1 or 2 to select the CAN peripheral . @retval None .
void CAN_DeInit(CAN_TypeDef* CANx)
{
  assert_param(IS_CAN_ALL_PERIPH(CANx));
  if (CANx == CAN1)
  {
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_CAN1, ENABLE);
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_CAN1, DISABLE);
  }
  else
  {  
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_CAN2, ENABLE);
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_CAN2, DISABLE);
  }
}
void CAN_DeInit ( CAN_TypeDef * CANx ) { assert_param ( IS_CAN_ALL_PERIPH ( CANx ) ) ; if ( CANx == CAN1 ) { RCC_APB1PeriphResetCmd ( RCC_APB1Periph_CAN1 , ENABLE ) ; RCC_APB1PeriphResetCmd ( RCC_APB1Periph_CAN1 , DISABLE ) ; } else { RCC_APB1PeriphResetCmd ( RCC_APB1Periph_CAN2 , ENABLE ) ; RCC_APB1PeriphResetCmd ( RCC_APB1Periph_CAN2 , DISABLE ) ; } }
@brief  Deinitializes the CAN peripheral registers to their default reset values.
@brief Deinitializes the CAN peripheral registers to their default reset values .
/* Check the parameters */ /* Enable CAN1 reset state */ /* Release CAN1 from reset state */ /* Enable CAN2 reset state */ /* Release CAN2 from reset state */