Device

Members

class iio.Device(ctx, _device)[source]

Contains the representation of an IIO device.

property attrs

List of attributes for this IIO device. type=dict of iio.Attr

property channels

List of channels available with this IIO device. type=list of iio.Channel objects

property context

Context for the device. type: iio.Context

property debug_attrs

List of debug attributes for this IIO device. type=dict of iio.Attr

event_stream()[source]

Create an events stream.

returns: type=contextlib._GeneratorContextManager

A generator for a EventStream instance.

find_channel(name_or_id, is_output=False)

Find a IIO channel by its name or ID.

Parameters
  • name_or_id – type=str The name or ID of the channel to find

  • is_output – type=bool Set to True to search for an output channel

returns: type=iio.Device or type=iio.Trigger

The IIO Device

property hwmon

Contains True if the device is a hardware-monitoring device, False if it is a IIO device. type=bool

property id

An identifier of this device, only valid in this IIO context. type=str

property label

The label of this device. type=str

property name

The name of this device. type=str

reg_read(reg)

Read the content of a register of this device.

Parameters

reg – type=int The register address

returns: type=int

The value of the register

reg_write(reg, value)

Set a value to one register of this device.

Parameters
  • reg – type=int The register address

  • value – type=int The value that will be used for this register

property trigger

Contains the configured trigger for this IIO device. type=iio.Trigger


Device attributes