Description
This function reads the last received CAN frame from the CAN controller. If there is no received CAN frame, the corresponding bytes will be 0.
Prototype
CPU_INT
16SXXX_R
ead(CPU_INT
16S devId,
CPU_INT
08U *buffer,
CPU_INT
16U size);
Parameter | Meaning |
---|---|
devId | device identifier, returned by |
buffer | Pointer to CAN frame of type CANFRM |
size | Size of buffer (must be equal to sizeof(CANFRM)) |
Return Value
Number of bytes in CAN frame or -1 if an error was detected.