Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

devId

device identifier, returned by XXX_Open()

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.