Module link_can

CAN总线类相关

Functions

Can:new (opts) 创建CAN总线实例
Can:open () 打开
Can:write (data) 写数据
Can:wait (timeout) 等待数据
Can:read () 读数据
Can:close () 关闭CAN总线


Functions

Can:new (opts)
创建CAN总线实例

Parameters:

  • opts table

Returns:

    table
Can:open ()
打开

Returns:

    boolean 成功与否
Can:write (data)
写数据

Parameters:

  • data table 数据

Returns:

    boolean 成功与否
Can:wait (timeout)
等待数据

Parameters:

  • timeout integer 超时 ms

Returns:

    boolean 成功与否
Can:read ()
读数据

Returns:

  1. boolean 成功与否
  2. table|nil 数据
Can:close ()
关闭CAN总线
generated by LDoc 1.5.0 Last updated 2025-09-29 06:23:42