Examples/Crusher/Linux/stm32/firmware/lib/src/peripherals/stm32f4xx_can.c
/**
  * @brief  Enables or disables the DBG Freeze for CAN.
  * @param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
  * @param  NewState: new state of the CAN peripheral. 
  *          This parameter can be: ENABLE (CAN reception/transmission is frozen
  *          during debug. Reception FIFOs can still be accessed/controlled normally) 
  *          or DISABLE (CAN is working during debug).
  * @retval None
  */
@brief  Enables or disables the DBG Freeze for CAN.
@param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
@param  NewState: new state of the CAN peripheral.
This parameter can be: ENABLE (CAN reception/transmission is frozen
during debug. Reception FIFOs can still be accessed/controlled normally)
or DISABLE (CAN is working during debug).
@retval None
@brief Enables or disables the DBG Freeze for CAN . @param CANx : where x can be 1 or 2 to to select the CAN peripheral . @param NewState : new state of the CAN peripheral . This parameter can be : ENABLE ( CAN reception / transmission is frozen during debug . Reception FIFOs can still be accessed / controlled normally ) or DISABLE ( CAN is working during debug ) . @retval None
void CAN_DBGFreeze(CAN_TypeDef* CANx, FunctionalState NewState)
{
  assert_param(IS_CAN_ALL_PERIPH(CANx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    CANx->MCR |= MCR_DBF;
  }
  else
  {
    CANx->MCR &= ~MCR_DBF;
  }
}
void CAN_DBGFreeze ( CAN_TypeDef * CANx , FunctionalState NewState ) { assert_param ( IS_CAN_ALL_PERIPH ( CANx ) ) ; assert_param ( IS_FUNCTIONAL_STATE ( NewState ) ) ; if ( NewState != DISABLE ) { CANx -> MCR |= MCR_DBF ; } else { CANx -> MCR &= ~ MCR_DBF ; } }
@brief  Enables or disables the DBG Freeze for CAN.
@brief Enables or disables the DBG Freeze for CAN .
/* Check the parameters */ /* Enable Debug Freeze  */ /* Disable Debug Freeze */