Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_iio_config Struct Reference

A configuration struct for an IIO device. More...

#include <sol-iio.h>

Data Fields

uint16_t api_version
 The API version. More...
 
int buffer_size
 The size of reading buffer. More...
 
const void * data
 User defined data to be sent to sol_iio_reader_cb. More...
 
int sampling_frequency
 Device sampling frequency. More...
 
char sampling_frequency_name [NAME_MAX]
 Sampling frequency sysfs node name. More...
 
void(* sol_iio_reader_cb )(void *data, struct sol_iio_device *device)
 Callback to be called when get new device readings on buffer. More...
 
const char * trigger_name
 Name of IIO trigger to be used on this device. More...
 

Detailed Description

A configuration struct for an IIO device.

See Also
sol_iio_open()
Examples:
/src/samples/iio+network/iio-gyroscope-console-and-mqtt-publish.c.

Field Documentation

uint16_t sol_iio_config::api_version
int sol_iio_config::buffer_size

The size of reading buffer.

0: use device default; -1: disable buffer and readings will be performed on channel files on sysfs.

Referenced by main().

const void* sol_iio_config::data

User defined data to be sent to sol_iio_reader_cb.

Examples:
/src/samples/iio+network/iio-gyroscope-console-and-mqtt-publish.c.

Referenced by main().

int sol_iio_config::sampling_frequency

Device sampling frequency.

-1 uses device default

Referenced by main().

char sol_iio_config::sampling_frequency_name[NAME_MAX]

Sampling frequency sysfs node name.

Some drivers expose the sampling frequency that is shared by channel type. Such as in_magn_sampling_frequency, in_accel_sampling_frequency.

void(* sol_iio_config::sol_iio_reader_cb)(void *data, struct sol_iio_device *device)

Callback to be called when get new device readings on buffer.

Examples:
/src/samples/iio+network/iio-gyroscope-console-and-mqtt-publish.c.

Referenced by main().

const char* sol_iio_config::trigger_name

Name of IIO trigger to be used on this device.

Set to hrtimer:trigger name if want to use hrtimer trigger. If NULL or empty, will try to use device current trigger. If device has no current trigger, will create a sysfs or hrtimer trigger and use it.

Examples:
/src/samples/iio+network/iio-gyroscope-console-and-mqtt-publish.c.

Referenced by main().


The documentation for this struct was generated from the following file: