18 (22)
13.1.10
simply_receive
Receives a single CAN message.
int8_t simply_receive(can_msg_t *can_msg);
Parameter
Parameter
Dir.
Description
can_msg
[out] Pointer to the CAN message structure the received CAN message is copied to
CAN Message Structure
typedef struct _can_msg {
uint32_t timestamp;
// in milliseconds
uint32_t ident;
// MSB=1: extended frame
uint8_t dlc;
// MSB=1: remote frame
uint8_t payload[8];
} can_msg_t;
Return Value
Return value
Description
1
Message received
0
No message available in the receive queue
-1
Error occurred, call
simply_get_last_error
for more information.
13.1.11
simply_send
Writes a CAN message to the transmit FIFO. To check if the message is transmitted, request the
CAN status with
bool simply_send(can_msg_t *can_msg);
Parameter
Parameter
Dir.
Description
can_msg
[in]
Pointer to a CAN message to be transmitted (see
)
Return Value
Return value
Description
true
Function succeeded
false
Error occurred, call
simply_get_last_error
for more information.
Remark
With
simply_send
CAN messages are not transmitted immediately but they are written to the
transmit FIFO. Check if the message is transmitted with
. If the
CAN_
STATUS_PENDING
flag is set, the message is not yet transmitted. Request the CAN status until
the
CAN_STATUS_PENDING
flag is not set any more.
simplyCAN User Manual
4.01.0001.22001 1.0 en-US