Examples/Crusher/Linux/stm32/firmware/lib/src/peripherals/stm32f4xx_can.c
/**
  * @brief  Enables or disables the specified CANx interrupts.
  * @param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
  * @param  CAN_IT: specifies the CAN interrupt sources to be enabled or disabled.
  *          This parameter can be: 
  *            @arg CAN_IT_TME: Transmit mailbox empty Interrupt 
  *            @arg CAN_IT_FMP0: FIFO 0 message pending Interrupt 
  *            @arg CAN_IT_FF0: FIFO 0 full Interrupt
  *            @arg CAN_IT_FOV0: FIFO 0 overrun Interrupt
  *            @arg CAN_IT_FMP1: FIFO 1 message pending Interrupt 
  *            @arg CAN_IT_FF1: FIFO 1 full Interrupt
  *            @arg CAN_IT_FOV1: FIFO 1 overrun Interrupt
  *            @arg CAN_IT_WKU: Wake-up Interrupt
  *            @arg CAN_IT_SLK: Sleep acknowledge Interrupt  
  *            @arg CAN_IT_EWG: Error warning Interrupt
  *            @arg CAN_IT_EPV: Error passive Interrupt
  *            @arg CAN_IT_BOF: Bus-off Interrupt  
  *            @arg CAN_IT_LEC: Last error code Interrupt
  *            @arg CAN_IT_ERR: Error Interrupt
  * @param  NewState: new state of the CAN interrupts.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
@brief  Enables or disables the specified CANx interrupts.
@param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
@param  CAN_IT: specifies the CAN interrupt sources to be enabled or disabled.
@brief Enables or disables the specified CANx interrupts . @param CANx : where x can be 1 or 2 to to select the CAN peripheral . @param CAN_IT : specifies the CAN interrupt sources to be enabled or disabled .
void CAN_ITConfig(CAN_TypeDef* CANx, uint32_t CAN_IT, FunctionalState NewState)
{
  assert_param(IS_CAN_ALL_PERIPH(CANx));
  assert_param(IS_CAN_IT(CAN_IT));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    CANx->IER |= CAN_IT;
  }
  else
  {
    CANx->IER &= ~CAN_IT;
  }
}
void CAN_ITConfig ( CAN_TypeDef * CANx , uint32_t CAN_IT , FunctionalState NewState ) { assert_param ( IS_CAN_ALL_PERIPH ( CANx ) ) ; assert_param ( IS_CAN_IT ( CAN_IT ) ) ; assert_param ( IS_FUNCTIONAL_STATE ( NewState ) ) ; if ( NewState != DISABLE ) { CANx -> IER |= CAN_IT ; } else { CANx -> IER &= ~ CAN_IT ; } }
@brief  Enables or disables the specified CANx interrupts.
@brief Enables or disables the specified CANx interrupts .
/* Check the parameters */ /* Enable the selected CANx interrupt */ /* Disable the selected CANx interrupt */