CAN Frames Reception functions.
More...
CAN Frames Reception functions.
===============================================================================
CAN Frames Reception functions
===============================================================================
This section provides functions allowing to
- Receive a correct CAN frame
- Release a specified receive FIFO (2 FIFOs are available)
- Return the number of the pending received CAN frames
void CAN_FIFORelease |
( |
CAN_TypeDef * |
CANx, |
|
|
uint8_t |
FIFONumber |
|
) |
| |
Releases the specified receive FIFO.
- Parameters
-
CANx,: | where x can be 1 or 2 to select the CAN peripheral. |
FIFONumber,: | FIFO to release, CAN_FIFO0 or CAN_FIFO1. |
- Return values
-
uint8_t CAN_MessagePending |
( |
CAN_TypeDef * |
CANx, |
|
|
uint8_t |
FIFONumber |
|
) |
| |
Returns the number of pending received messages.
- Parameters
-
CANx,: | where x can be 1 or 2 to select the CAN peripheral. |
FIFONumber,: | Receive FIFO number, CAN_FIFO0 or CAN_FIFO1. |
- Return values
-
NbMessage | : which is the number of pending message. |
void CAN_Receive |
( |
CAN_TypeDef * |
CANx, |
|
|
uint8_t |
FIFONumber, |
|
|
CanRxMsg * |
RxMessage |
|
) |
| |
Receives a correct CAN frame.
- Parameters
-
CANx,: | where x can be 1 or 2 to select the CAN peripheral. |
FIFONumber,: | Receive FIFO number, CAN_FIFO0 or CAN_FIFO1. |
RxMessage,: | pointer to a structure receive frame which contains CAN Id, CAN DLC, CAN data and FMI number. |
- Return values
-