Ashet OS

namespace: ashet.io.i2c

Documentation

Functions and types related to the I²C bus.

Types

System Calls

syscall enumerate(in list: ?[]BusID, out count: usize)
syscall query_metadata(in id: BusID, in name_buf: ?[]u8, out name_len: usize)

Queries information about the given serial port id.

syscall open(in id: BusID, out bus: Bus)

Asynchronous Operations

async_call Execute(in bus: Bus, in sequence: []Operation, out count: usize)

Performs a sequence of I²C operations on the bus without interruption.

This function allows to ping devices, read or write data from/to the devices.

The operations are performed first-to-last without interruption. If an operation fails, the sequence will be aborted.