Module serial

串口连接,继承Link

Functions

Serial:init (opts) 创建串口实例
Serial:open () 打开
Serial:write (data) 写数据
Serial:close () 关闭串口


Functions

Serial:init (opts)
创建串口实例

Parameters:

  • opts table

Returns:

    table
Serial:open ()
打开

Returns:

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

Parameters:

  • data string 数据

Returns:

    boolean 成功与否
Serial:close ()
关闭串口
generated by LDoc 1.5.0 Last updated 2026-03-23 10:22:38