...
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 |
---|---|
| Unique bus identifier |
| Pointer to CAN frame of type CANFRM |
| 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.
...