Articles Posted in the " " Category

  • remoteID()

    remoteID()

    描述 取得从 CAN bus 上接收到的资料 ID。 语法 CAN.remoteID() 参数 回传 收到的资料 ID See also - remoteExt() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • remoteExt()

    remoteExt()

    描述 取得从 CAN bus 上接收到的资料格式。 语法 CAN.remoteExt() 参数 回传 收到的资料格式。有以下四种: CAN_STDID:标准资料帧 CAN_EXTID:扩展资料帧 CAN_STDID_REMOTE:标准远端帧 CAN_EXTID_REMOTE:扩展远端帧 See also - remoteID() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • available()

    available()

    描述 检查 CAN FIFO 内是否还有可读取的值。 语法 CAN.available() 参数 回传 FIFO 内可供读取的 byte 数 范例 See also - requestFrom() - read() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • read()

    read()

    描述 读取 CAN FIFO 中的资料。 语法 CAN.read() 参数 回传 假如 FIFO 非空,则回传 1 byte 的值,反之则回传 -1。 范例 See also - requestFrom() - available() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • requestFrom()

    requestFrom()

    描述 接收 CAN bus 上的资料。 语法 CAN.requestFrom() 参数 回传 接收到的 byte 数 范例 See also - available() - read() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • endTransmission()

    endTransmission()

    描述 结束 CAN 的传送。 语法 CAN.endTransmission() 参数 回传 0:代表成功 -1:代表失败 范例 See also - beginTransmission() - write() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • write()

    write()

    描述 送出指定的资料。 语法 CAN.write(val) CAN.write(buf, len) 参数 val:要传送的资料 (unsigned char 型别) buf:要传送的资料阵列 len:阵列大小 回传 写出去的 byte 数 范例 See also - beginTransmission() - endTransmission() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • beginTransmission()

    beginTransmission()

    描述 初始化传送状态。注意:此函式的用法和 Wire 函式库中的 beginTransmission() 类似,你必须在后面紧接着呼叫 write() 和 endTransmission(),才能完成一次传送行为。 语法 CAN.beginTransmission(id) CAN.beginTransmission(id, ext) 参数 id:外部 CAN device 的 ID 编号 ext:传送资料的格式。此参数是非必要的,如果没有输入此参数,预设值是 CAN_STDID。 CAN_STDID:标准资料帧,符合 CAN 2.0A 规范,ID 范围:0 ~ 0x7FF CAN_EXTID:扩展资料帧,使用 CAN 2.0B 规范,ID 范围:0 ~ 0x1FFFFFFF CAN_STDID_REMOTE:标准远端帧,符合 CAN 2.0A 规范,ID 范围:0 ~ 0x7FF CAN_EXTID_REMOTE:扩展远端帧,符合 CAN 2.0B 规范,ID 范围:0 ~ 0x1FFFFFFF 回传 无回传值 范例 See also […]


  • begin()

    begin()

    描述 初始化 CANBus 函式库。 语法 CAN.begin() CAN.begin(speed) 参数 speed:CAN 的传输速度,可以设定以下 10 种速度其中之一。此参数是非必要的,如果没有输入此参数,预设的传输速度是 10KBPS。 CAN_10KBPS CAN_20KBPS CAN_50KBPS CAN_83K3BPS CAN_100KBPS CAN_125KBPS CAN_250KBPS CAN_500KBPS CAN_833KBPS CAN_1000KBPS 回传 无回传值 范例 See also - beginTransmission() - write() - endTransmission() 函式库参考主页面 The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference […]