Versions Compared

Key

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

...

This function is called by the application to obtain a frame from the opened CAN bus. The function will wait for a frame to be received on the CAN bus or until the configured timeout is reached.

Prototype

CPU_INT16SINT16S CanBusRead(CPU_INT16SINT16S   busId,
void *buffer,
CPU_INT16UINT16U size);

Parameter

Meaning

busId

Unique bus identifier

buffer

Pointer to CAN frame of type CANFRM

size

Size of buffer in bytes (must be equal to sizeof(CANFRM))

Note

...

A timeout is not handled as an error, therefore the return value in this case is 0.

...