Device
Members
- class iio.Device(ctx, _device)
Contains the representation of an IIO device.
- event_stream()
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 firmware_uploads
Firmware upload instances of this IIO device. type=dict of iio.FirmwareUpload
- fw_upload(fwu_id, data, timeout_ms=None)
Upload a firmware image, and wait for the upload to complete.
- Parameters:
fwu_id – type=str The ID of the firmware upload instance.
data – type=bytes-like object The firmware image.
timeout_ms – type=int Maximum time to wait, in milliseconds. Wait until the upload completes if None.
- returns: type=bool
True if the upload completed, False if it is still in progress after timeout_ms.
- property hwmon
Contains True if the device is a hardware-monitoring device, False if it is a IIO device. type=bool
- 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