Ashet OS

async_call: ashet.io.serial.read

Documentation

Reads data from a serial port.

Inputs

port: io.serial.SerialPort
data: bytebuf

Outputs

read: usize

Number of words read from the serial port.

stop_reason: io.serial.SerialPortError

This contains the reason why not *all* data was read.

Errors

InvalidHandle
WordSizeMismatch

The serial port uses a word size that needs more than 8 bits per word.