classstuds::Uart

sys::Obj
  studs::Uart

Uart models a UART port instance.

See Uart chapter for details.

close

Void close()

Close this port.

in

InStream in()

Get an InStream to read this port. Throws IOErr if port not open.

list

static Str:Obj list()

List the available uart ports on this device.

open

static Uart open(Str name, UartConfig config)

Open the serial port name with given config. Throws IOErr if port cannot be opened.

out

OutStream out()

Get an OutStream to write to this port. Throws IOErr if port not open.

read

Buf read()

Read the available bytes this port, which may be 0 if data is not available. Throws IOErr if read failed.

write

Void write(Buf buf)

Write the given bytes to this port. Throws IOErr if write failed.