sendMsgBuf()
Description
Transmit data to remote CAN device.(
Depending on your preferences, you can use this function to transmit data instead of the beginTransmission()
and write()
functions.
Syntax
CAN.sendMsgBuf(id, ext, len, buf)
Parameters
id
:Device ID for the remote CAN deviceext
:Data transmission format
- CAN_STDID:Standard data frame, comply with CAN 2.0A standard. ID range: 0 ~ 0x7FF
- CAN_EXTID:Extended data frame, based on CAN 2.0B standard. ID range: 0 ~ 0x1FFFFFFF
- CAN_STDID_REMOTE:Standard data frame, comply with CAN 2.0A standard. ID range: 0 ~ 0x7FF
- CAN_EXTID_REMOTE:Extended data frame, comply with CAN 2.0B standard. ID range: 0 ~ 0x1FFFFFF
len
:size of the arraybuf
:data array
Returns
CAN_OK:Data transmitted
CAN_FAIL:Data transmission failed.
0 件のコメント:
コメントを投稿