plinth/browser/serial

Types

pub type SerialPort

Functions

pub fn get_info(port: SerialPort) -> Result(#(Int, Int), Nil)
pub fn get_ports() -> Promise(Result(Array(SerialPort), Nil))
pub fn open(
  port: SerialPort,
  baud_rate: Int,
) -> Promise(Result(Nil, Nil))
pub fn read(
  port: SerialPort,
  callback: fn(BitArray) -> Nil,
) -> Promise(Result(Nil, Nil))
pub fn request_port() -> Promise(Result(SerialPort, Nil))
Search Document