Examples/Crusher/Linux/stm32/firmware/lib/src/peripherals/stm32f4xx_can.c
/**
  * @brief  Returns the LSB of the 9-bit CANx Transmit Error Counter(TEC).
  * @param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
  * @retval LSB of the 9-bit CAN Transmit Error Counter. 
  */
@brief  Returns the LSB of the 9-bit CANx Transmit Error Counter(TEC).
@param  CANx: where x can be 1 or 2 to to select the CAN peripheral.
@retval LSB of the 9-bit CAN Transmit Error Counter.
@brief Returns the LSB of the 9 - bit CANx Transmit Error Counter ( TEC ) . @param CANx : where x can be 1 or 2 to to select the CAN peripheral . @retval LSB of the 9 - bit CAN Transmit Error Counter .
uint8_t CAN_GetLSBTransmitErrorCounter(CAN_TypeDef* CANx)
{
  uint8_t counter=0;
  assert_param(IS_CAN_ALL_PERIPH(CANx));
  counter = (uint8_t)((CANx->ESR & CAN_ESR_TEC)>> 16);
  return counter;
}
uint8_t CAN_GetLSBTransmitErrorCounter ( CAN_TypeDef * CANx ) { uint8_t counter = 0 ; assert_param ( IS_CAN_ALL_PERIPH ( CANx ) ) ; counter = ( uint8_t ) ( ( CANx -> ESR & CAN_ESR_TEC ) >> 16 ) ; return counter ; }
@brief  Returns the LSB of the 9-bit CANx Transmit Error Counter(TEC).
@brief Returns the LSB of the 9 - bit CANx Transmit Error Counter ( TEC ) .
/* Check the parameters */ /* Get the LSB of the 9-bit CANx Transmit Error Counter(TEC) */ /* Return the LSB of the 9-bit CANx Transmit Error Counter(TEC) */