XXX_Read
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_INT16S XXX_Read(CPU_INT16S devId, CPU_INT08U *buffer, CPU_INT16U size);
Parameter | Meaning |
---|---|
| device identifier, returned by |
| Pointer to CAN frame of type CANFRM |
| Size of buffer (must be equal to |
Return Value
Number of bytes in CAN frame or -1 if an error was detected.