libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_can.c
/**
  * @brief  Returns the number of pending messages.
  * @param  CANx:       where x can be 1 or 2 to to select the CAN peripheral.
  * @param  FIFONumber: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
  * @retval NbMessage : which is the number of pending message.
  */
@brief  Returns the number of pending messages.
@param  CANx:       where x can be 1 or 2 to to select the CAN peripheral.
@brief Returns the number of pending messages . @param CANx : where x can be 1 or 2 to to select the CAN peripheral .
uint8_t CAN_MessagePending(CAN_TypeDef* CANx, uint8_t FIFONumber)
{
  uint8_t message_pending=0;
  assert_param(IS_CAN_ALL_PERIPH(CANx));
  assert_param(IS_CAN_FIFO(FIFONumber));
  if (FIFONumber == CAN_FIFO0)
  {
    message_pending = (uint8_t)(CANx->RF0R&(uint32_t)0x03);
  }
  else if (FIFONumber == CAN_FIFO1)
  {
    message_pending = (uint8_t)(CANx->RF1R&(uint32_t)0x03);
  }
  else
  {
    message_pending = 0;
  }
  return message_pending;
}
uint8_t CAN_MessagePending ( CAN_TypeDef * CANx , uint8_t FIFONumber ) { uint8_t message_pending = 0 ; assert_param ( IS_CAN_ALL_PERIPH ( CANx ) ) ; assert_param ( IS_CAN_FIFO ( FIFONumber ) ) ; if ( FIFONumber == CAN_FIFO0 ) { message_pending = ( uint8_t ) ( CANx -> RF0R & ( uint32_t ) 0x03 ) ; } else if ( FIFONumber == CAN_FIFO1 ) { message_pending = ( uint8_t ) ( CANx -> RF1R & ( uint32_t ) 0x03 ) ; } else { message_pending = 0 ; } return message_pending ; }
@brief  Returns the number of pending messages.
@brief Returns the number of pending messages .
/* Check the parameters */