Hardware Monitoring Devices

enum hwmon_chan_type

Hwmon channel type.

Libiio support hardware-monitoring (hwmon) devices as well. This enum specifies the type of data associated with the hwmon channel.

NOTE: as of 2021 only the current hwmon API is supported. The old and deprecated APIs are not supported, and won’t be supported unless we have a case where updating a hwmon driver is not possible.

Values:

enumerator HWMON_VOLTAGE
enumerator HWMON_FAN
enumerator HWMON_PWM
enumerator HWMON_TEMP
enumerator HWMON_CURRENT
enumerator HWMON_POWER
enumerator HWMON_ENERGY
enumerator HWMON_HUMIDITY
enumerator HWMON_INTRUSION
enumerator HWMON_CHAN_TYPE_UNKNOWN
static inline enum hwmon_chan_type hwmon_channel_get_type(const struct iio_channel *chn)

Get the type of the given hwmon channel.

Parameters:

chn – A pointer to an iio_channel structure

Returns:

The type of the hwmon channel NOTE: Before calling this function, iio_device_is_hwmon() should be called to verify that the passed channel object belongs to a HWMON device.

static inline bool iio_device_is_hwmon(const struct iio_device *dev)

Get whether or not the device is a hardware monitoring device.

Parameters:

dev – A pointer to an iio_device structure

Returns:

True if the device is a hardware monitoring device, false if it is a IIO device