Expand description
io
module contains basic input/output operations.
Constants§
Functions§
available
reports the number of bytes available in buffer ready to be read.configuration
returns the current I/O configuration as triple (bitrate
,data_bits
,stop_bits
).- Configure UART I/O communication.
read
reads N bytes.read_available
reads data that is currently available in receive-buffer intobuffer
, up until receive-buffer is empty orbuffer
is filled. Returns number of bytes read, possibly 0 if no bytes are available in the buffer.read_checked
readsN
bytes after checking for availability in the current reception buffer.read_into
reads bytes with length of the slice into the provided slice.read_into_checked
reads to fill providedbuffer
iff sufficient data is available in receive-buffer.read_into_restricted
will attempt to read data from receive-buffer. The read amount is either a full buffer, or whatever was available at that time. The maximum amount of time spent on receiving data is limited bycycles
number of iterations.read_into_timed
receives data intobuffer
until buffer is filled ortimeout
is reached.timeout
is a timeout in milliseconds.read_timed
readsN
bytes or untiltimeout
(milliseconds) is reached.read_u8
reads a single byte.wait
blocks (actively checking status) until new bytes arrive to be read.write
writes provided data.write_u8
writes a single byte.