Home Documentation Tutorials API GitHub

All Types

class studs::I2C

sys::Obj
  studs::I2C

I2C allows you to communicate over serial I2C interfaces.

See I2C chapter for details.

close

Void close()

Close this port.

open

const static I2C open(Str name)

Open a I2C port with given I2C bus name. Throws IOErr if port could not be opended.

read

Buf read(Int addr, Int len)

Read len bytes from the device at addr. Throw IOErr if read failed.

write

This write(Int addr, Buf data)

Write the specified data to the device at addr. Throws IOErr if write failed. Return this.