Rho Rho language and toolchain

std.embedded.i2c

The module module std.embedded.i2c, read from deploy/std/embedded/i2c.rho. This page is generated from the source, so it describes what the code declares.

Functions

init()

fn init(bus: u32) void

read()

fn read(addr: u32, out: Slice[u8]) u32

write()

fn write(addr: u32, data: Slice[u8]) u32

Externs

Externs are supplied by the host rather than declared in Rho, which is how a port reaches a service.

ExternSignature
i2chwinitextern fn i2c_hw_init(bus: u32) void
i2chwreadextern fn i2c_hw_read(addr: u32, ptr: Ptr[u8], len: u32) u32
i2chwwriteextern fn i2c_hw_write(addr: u32, ptr: Ptr[u8], len: u32) u32