[][src]Crate libiio_sys

Structs

__BindgenBitfieldUnit
__fsid_t
__pthread_internal_list
__sigset_t
div_t
drand48_data
fd_set
iio_buffer
iio_channel
iio_context
iio_context_info
iio_data_format

@defgroup Debug Debug and low-level functions @{ @struct iio_data_format @brief Contains the format of a data sample.

iio_device
iio_scan_context
ldiv_t
lldiv_t
max_align_t
pthread_cond_t__bindgen_ty_1
pthread_mutex_t___pthread_mutex_s
pthread_rwlock_t__bindgen_ty_1
random_data
timespec
timeval
wait__bindgen_ty_1
wait__bindgen_ty_2

Constants

AIO_PRIO_DELTA_MAX
ARG_MAX
BC_BASE_MAX
BC_DIM_MAX
BC_SCALE_MAX
BC_STRING_MAX
BIG_ENDIAN
BYTE_ORDER
CHARCLASS_NAME_MAX
COLL_WEIGHTS_MAX
DELAYTIMER_MAX
EXIT_FAILURE
EXIT_SUCCESS
EXPR_NEST_MAX
FD_SETSIZE
HOST_NAME_MAX
INT8_MIN
INT8_MAX
INT16_MIN
INT16_MAX
INT32_MIN
INT32_MAX
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MIN
INT_FAST8_MAX
INT_FAST16_MIN
INT_FAST16_MAX
INT_FAST32_MIN
INT_FAST32_MAX
INT_LEAST8_MIN
INT_LEAST8_MAX
INT_LEAST16_MIN
INT_LEAST16_MAX
INT_LEAST32_MIN
INT_LEAST32_MAX
LINE_MAX
LINK_MAX
LITTLE_ENDIAN
LOGIN_NAME_MAX
MAX_CANON
MAX_INPUT
MB_LEN_MAX
MQ_PRIO_MAX
NAME_MAX
NGROUPS_MAX
NR_OPEN
PATH_MAX
PDP_ENDIAN
PIPE_BUF
PTHREAD_DESTRUCTOR_ITERATIONS
PTHREAD_KEYS_MAX
PTHREAD_STACK_MIN
PTRDIFF_MAX
PTRDIFF_MIN
RAND_MAX
RE_DUP_MAX
RTSIG_MAX
SEM_VALUE_MAX
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
TTY_NAME_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WCONTINUED
WEXITED
WINT_MAX
WINT_MIN
WNOHANG
WNOWAIT
WSTOPPED
WUNTRACED
XATTR_LIST_MAX
XATTR_NAME_MAX
XATTR_SIZE_MAX
_ALLOCA_H
_ATFILE_SOURCE
_BITS_BYTESWAP_H
_BITS_POSIX1_LIM_H
_BITS_POSIX2_LIM_H
_BITS_PTHREADTYPES_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_BSD_SOURCE
_DEFAULT_SOURCE
_ENDIAN_H
_FEATURES_H
_LIBC_LIMITS_H_
_POSIX2_BC_BASE_MAX
_POSIX2_BC_DIM_MAX
_POSIX2_BC_SCALE_MAX
_POSIX2_BC_STRING_MAX
_POSIX2_COLL_WEIGHTS_MAX
_POSIX2_EXPR_NEST_MAX
_POSIX2_LINE_MAX
_POSIX2_RE_DUP_MAX
_POSIX2_CHARCLASS_NAME_MAX
_POSIX_AIO_LISTIO_MAX
_POSIX_AIO_MAX
_POSIX_ARG_MAX
_POSIX_CHILD_MAX
_POSIX_CLOCKRES_MIN
_POSIX_C_SOURCE
_POSIX_DELAYTIMER_MAX
_POSIX_HOST_NAME_MAX
_POSIX_LINK_MAX
_POSIX_LOGIN_NAME_MAX
_POSIX_MAX_CANON
_POSIX_MAX_INPUT
_POSIX_MQ_OPEN_MAX
_POSIX_MQ_PRIO_MAX
_POSIX_NAME_MAX
_POSIX_NGROUPS_MAX
_POSIX_OPEN_MAX
_POSIX_PATH_MAX
_POSIX_PIPE_BUF
_POSIX_RE_DUP_MAX
_POSIX_RTSIG_MAX
_POSIX_SEM_NSEMS_MAX
_POSIX_SEM_VALUE_MAX
_POSIX_SIGQUEUE_MAX
_POSIX_SOURCE
_POSIX_SSIZE_MAX
_POSIX_STREAM_MAX
_POSIX_SYMLINK_MAX
_POSIX_SYMLOOP_MAX
_POSIX_THREAD_DESTRUCTOR_ITERATIONS
_POSIX_THREAD_KEYS_MAX
_POSIX_THREAD_THREADS_MAX
_POSIX_TIMER_MAX
_POSIX_TTY_NAME_MAX
_POSIX_TZNAME_MAX
_SIGSET_H_types
_STDC_PREDEF_H
_STDINT_H
_STDLIB_H
_STRUCT_TIMEVAL
_SVID_SOURCE
_SYS_CDEFS_H
_SYS_SELECT_H
_SYS_SYSMACROS_H
_SYS_TYPES_H
__BIG_ENDIAN
__BIT_TYPES_DEFINED__
__BYTE_ORDER
__ENUM_IDTYPE_T
__FD_SETSIZE
__FD_ZERO_STOS
__FLOAT_WORD_ORDER
__GLIBC_MINOR__
__GLIBC__
__GNU_LIBRARY__
__INO_T_MATCHES_INO64_T
__LITTLE_ENDIAN
__OFF_T_MATCHES_OFF64_T
__PDP_ENDIAN
__PTHREAD_MUTEX_HAVE_ELISION
__PTHREAD_MUTEX_HAVE_PREV
__PTHREAD_RWLOCK_INT_FLAGS_SHARED
__SIZEOF_PTHREAD_ATTR_T
__SIZEOF_PTHREAD_BARRIERATTR_T
__SIZEOF_PTHREAD_BARRIER_T
__SIZEOF_PTHREAD_CONDATTR_T
__SIZEOF_PTHREAD_COND_T
__SIZEOF_PTHREAD_MUTEXATTR_T
__SIZEOF_PTHREAD_MUTEX_T
__SIZEOF_PTHREAD_RWLOCKATTR_T
__SIZEOF_PTHREAD_RWLOCK_T
__STDC_IEC_559__
__STDC_IEC_559_COMPLEX__
__STDC_ISO_10646__
__STDC_NO_THREADS__
__SYSCALL_WORDSIZE
__USE_ATFILE
__USE_BSD
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_SVID
__USE_XOPEN2K
__USE_XOPEN2K8
__WALL
__WCLONE
__WCOREFLAG
__WNOTHREAD
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__W_CONTINUED
__bool_true_false_are_defined
__clock_t_defined
__clockid_t_defined
__have_pthread_attr_t
__ldiv_t_defined
__lldiv_t_defined
__time_t_defined
__timer_t_defined
__timespec_defined
false_
idtype_t_P_ALL
idtype_t_P_PGID
idtype_t_P_PID
iio_chan_type_IIO_ACCEL
iio_chan_type_IIO_ACTIVITY
iio_chan_type_IIO_ALTVOLTAGE
iio_chan_type_IIO_ANGL
iio_chan_type_IIO_ANGL_VEL
iio_chan_type_IIO_CAPACITANCE
iio_chan_type_IIO_CCT
iio_chan_type_IIO_CHAN_TYPE_UNKNOWN
iio_chan_type_IIO_CONCENTRATION
iio_chan_type_IIO_COUNT
iio_chan_type_IIO_CURRENT
iio_chan_type_IIO_DISTANCE
iio_chan_type_IIO_ELECTRICALCONDUCTIVITY
iio_chan_type_IIO_ENERGY
iio_chan_type_IIO_GRAVITY
iio_chan_type_IIO_HUMIDITYRELATIVE
iio_chan_type_IIO_INCLI
iio_chan_type_IIO_INDEX
iio_chan_type_IIO_INTENSITY
iio_chan_type_IIO_LIGHT
iio_chan_type_IIO_MAGN
iio_chan_type_IIO_PH
iio_chan_type_IIO_POWER
iio_chan_type_IIO_PRESSURE
iio_chan_type_IIO_PROXIMITY
iio_chan_type_IIO_RESISTANCE
iio_chan_type_IIO_ROT
iio_chan_type_IIO_STEPS
iio_chan_type_IIO_TEMP
iio_chan_type_IIO_TIMESTAMP
iio_chan_type_IIO_UVINDEX
iio_chan_type_IIO_VELOCITY
iio_chan_type_IIO_VOLTAGE
iio_modifier_IIO_MOD_CO2
iio_modifier_IIO_MOD_I
iio_modifier_IIO_MOD_JOGGING
iio_modifier_IIO_MOD_LIGHT_BLUE
iio_modifier_IIO_MOD_LIGHT_BOTH
iio_modifier_IIO_MOD_LIGHT_CLEAR
iio_modifier_IIO_MOD_LIGHT_GREEN
iio_modifier_IIO_MOD_LIGHT_IR
iio_modifier_IIO_MOD_LIGHT_RED
iio_modifier_IIO_MOD_LIGHT_UV
iio_modifier_IIO_MOD_NORTH_MAGN
iio_modifier_IIO_MOD_NORTH_MAGN_TILT_COMP
iio_modifier_IIO_MOD_NORTH_TRUE
iio_modifier_IIO_MOD_NORTH_TRUE_TILT_COMP
iio_modifier_IIO_MOD_Q
iio_modifier_IIO_MOD_QUATERNION
iio_modifier_IIO_MOD_ROOT_SUM_SQUARED_X_Y
iio_modifier_IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z
iio_modifier_IIO_MOD_RUNNING
iio_modifier_IIO_MOD_STILL
iio_modifier_IIO_MOD_SUM_SQUARED_X_Y_Z
iio_modifier_IIO_MOD_TEMP_AMBIENT
iio_modifier_IIO_MOD_TEMP_OBJECT
iio_modifier_IIO_MOD_VOC
iio_modifier_IIO_MOD_WALKING
iio_modifier_IIO_MOD_X
iio_modifier_IIO_MOD_X_AND_Y
iio_modifier_IIO_MOD_X_AND_Y_AND_Z
iio_modifier_IIO_MOD_X_AND_Z
iio_modifier_IIO_MOD_X_OR_Y
iio_modifier_IIO_MOD_X_OR_Y_OR_Z
iio_modifier_IIO_MOD_X_OR_Z
iio_modifier_IIO_MOD_Y
iio_modifier_IIO_MOD_Y_AND_Z
iio_modifier_IIO_MOD_Y_OR_Z
iio_modifier_IIO_MOD_Z
iio_modifier_IIO_NO_MOD
true_

Functions

_Exit
__ctype_get_mb_cur_max
a64l
abort
abs
aligned_alloc
alloca
at_quick_exit
atexit
atof
atoi
atol
atoll
bsearch
calloc
cfree
clearenv
div
drand48
drand48_r
ecvt
ecvt_r
erand48
erand48_r
exit
fcvt
fcvt_r
free
gcvt
getenv
getloadavg
getsubopt
gnu_dev_major
gnu_dev_makedev
gnu_dev_minor
iio_buffer_cancel

@brief Cancel all buffer operations @param buf The buffer for which operations should be canceled

iio_buffer_destroy

@brief Destroy the given buffer @param buf A pointer to an iio_buffer structure

iio_buffer_end

@brief Get the address that follows the last sample in a buffer @param buf A pointer to an iio_buffer structure @return A pointer corresponding to the address that follows the last sample present in the buffer

iio_buffer_first

@brief Find the first sample of a channel in a buffer @param buf A pointer to an iio_buffer structure @param chn A pointer to an iio_channel structure @return A pointer to the first sample found, or to the end of the buffer if no sample for the given channel is present in the buffer

iio_buffer_foreach_sample

@brief Call the supplied callback for each sample found in a buffer @param buf A pointer to an iio_buffer structure @param callback A pointer to a function to call for each sample found @param data A user-specified pointer that will be passed to the callback @return number of bytes processed.

iio_buffer_get_data

@brief Retrieve a previously associated pointer of an iio_buffer structure @param buf A pointer to an iio_buffer structure @return The pointer previously associated if present, or NULL

iio_buffer_get_device

@brief Retrieve a pointer to the iio_device structure @param buf A pointer to an iio_buffer structure @return A pointer to an iio_device structure

iio_buffer_get_poll_fd

@brief Get a pollable file descriptor

iio_buffer_push

@brief Send the samples to the hardware @param buf A pointer to an iio_buffer structure @return On success, the number of bytes written is returned @return On error, a negative errno code is returned

iio_buffer_push_partial

@brief Send a given number of samples to the hardware @param buf A pointer to an iio_buffer structure @param samples_count The number of samples to submit @return On success, the number of bytes written is returned @return On error, a negative errno code is returned

iio_buffer_refill

@brief Fetch more samples from the hardware @param buf A pointer to an iio_buffer structure @return On success, the number of bytes read is returned @return On error, a negative errno code is returned

iio_buffer_set_blocking_mode

@brief Make iio_buffer_refill() and iio_buffer_push() blocking or not

iio_buffer_set_data

@brief Associate a pointer to an iio_buffer structure @param buf A pointer to an iio_buffer structure @param data The pointer to be associated

iio_buffer_start

@brief Get the start address of the buffer @param buf A pointer to an iio_buffer structure @return A pointer corresponding to the start address of the buffer

iio_buffer_step

@brief Get the step size between two samples of one channel @param buf A pointer to an iio_buffer structure @return the difference between the addresses of two consecutive samples of one same channel

iio_channel_attr_get_filename

@brief Retrieve the filename of an attribute @param chn A pointer to an iio_channel structure @param attr a NULL-terminated string corresponding to the name of the attribute @return On success, a pointer to a static NULL-terminated string @return If the attribute name is unknown, NULL is returned

iio_channel_attr_read

@brief Read the content of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param dst A pointer to the memory area where the NULL-terminated string corresponding to the value read will be stored @param len The available length of the memory area, in bytes @return On success, the number of bytes written to the buffer @return On error, a negative errno code is returned

iio_channel_attr_read_all

@brief Read the content of all channel-specific attributes @param chn A pointer to an iio_channel structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_read_bool

@brief Read the content of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a bool variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_read_double

@brief Read the content of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a double variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_read_longlong

@brief Read the content of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a long long variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_write

@brief Set the value of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A NULL-terminated string to set the attribute to @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_channel_attr_write_all

@brief Set the values of all channel-specific attributes @param chn A pointer to an iio_channel structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_write_bool

@brief Set the value of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A bool value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_write_double

@brief Set the value of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A double value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_write_longlong

@brief Set the value of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A long long value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_channel_attr_write_raw

@brief Set the value of the given channel-specific attribute @param chn A pointer to an iio_channel structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A pointer to the data to be written @param len The number of bytes that should be written @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_channel_convert

@brief Convert the sample from hardware format to host format @param chn A pointer to an iio_channel structure @param dst A pointer to the destination buffer where the converted sample should be written @param src A pointer to the source buffer containing the sample

iio_channel_convert_inverse

@brief Convert the sample from host format to hardware format @param chn A pointer to an iio_channel structure @param dst A pointer to the destination buffer where the converted sample should be written @param src A pointer to the source buffer containing the sample

iio_channel_disable

@brief Disable the given channel @param chn A pointer to an iio_channel structure

iio_channel_enable

@brief Enable the given channel @param chn A pointer to an iio_channel structure

iio_channel_find_attr

@brief Try to find a channel-specific attribute by its name @param chn A pointer to an iio_channel structure @param name A NULL-terminated string corresponding to the name of the attribute @return On success, a pointer to a static NULL-terminated string @return If the name does not correspond to any known attribute of the given channel, NULL is returned

iio_channel_get_attr

@brief Get the channel-specific attribute present at the given index @param chn A pointer to an iio_channel structure @param index The index corresponding to the attribute @return On success, a pointer to a static NULL-terminated string @return If the index is invalid, NULL is returned

iio_channel_get_attrs_count

@brief Enumerate the channel-specific attributes of the given channel @param chn A pointer to an iio_channel structure @return The number of channel-specific attributes found

iio_channel_get_data

@brief Retrieve a previously associated pointer of an iio_channel structure @param chn A pointer to an iio_channel structure @return The pointer previously associated if present, or NULL

iio_channel_get_data_format

@brief Get a pointer to a channel's data format structure @param chn A pointer to an iio_channel structure @return A pointer to the channel's iio_data_format structure

iio_channel_get_device

@brief Retrieve a pointer to the iio_device structure @param chn A pointer to an iio_channel structure @return A pointer to an iio_device structure

iio_channel_get_id

@brief Retrieve the channel ID (e.g. voltage0) @param chn A pointer to an iio_channel structure @return A pointer to a static NULL-terminated string

iio_channel_get_index

@brief Get the index of the given channel @param chn A pointer to an iio_channel structure @return On success, the index of the specified channel @return On error, a negative errno code is returned

iio_channel_get_modifier

@brief Get the modifier type of the given channel @param chn A pointer to an iio_channel structure @return The modifier type of the channel

iio_channel_get_name

@brief Retrieve the channel name (e.g. vccint) @param chn A pointer to an iio_channel structure @return A pointer to a static NULL-terminated string

iio_channel_get_type

@brief Get the type of the given channel @param chn A pointer to an iio_channel structure @return The type of the channel

iio_channel_is_enabled

@brief Returns True if the channel is enabled @param chn A pointer to an iio_channel structure @return True if the channel is enabled, False otherwise

iio_channel_is_output

@brief Return True if the given channel is an output channel @param chn A pointer to an iio_channel structure @return True if the channel is an output channel, False otherwise

iio_channel_is_scan_element

@brief Return True if the given channel is a scan element @param chn A pointer to an iio_channel structure @return True if the channel is a scan element, False otherwise

iio_channel_read

Demultiplex and convert the samples of a given channel @param chn A pointer to an iio_channel structure @param buffer A pointer to an iio_buffer structure @param dst A pointer to the memory area where the converted data will be stored @param len The available length of the memory area, in bytes @return The size of the converted data, in bytes

iio_channel_read_raw

Demultiplex the samples of a given channel @param chn A pointer to an iio_channel structure @param buffer A pointer to an iio_buffer structure @param dst A pointer to the memory area where the demultiplexed data will be stored @param len The available length of the memory area, in bytes @return The size of the demultiplexed data, in bytes

iio_channel_set_data

@brief Associate a pointer to an iio_channel structure @param chn A pointer to an iio_channel structure @param data The pointer to be associated

iio_channel_write

Convert and multiplex the samples of a given channel @param chn A pointer to an iio_channel structure @param buffer A pointer to an iio_buffer structure @param src A pointer to the memory area where the sequential data will be read from @param len The length of the memory area, in bytes @return The number of bytes actually converted and multiplexed

iio_channel_write_raw

Multiplex the samples of a given channel @param chn A pointer to an iio_channel structure @param buffer A pointer to an iio_buffer structure @param src A pointer to the memory area where the sequential data will be read from @param len The length of the memory area, in bytes @return The number of bytes actually multiplexed

iio_context_clone

@brief Duplicate a pre-existing IIO context @param ctx A pointer to an iio_context structure @return On success, A pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_context_destroy

@brief Destroy the given context @param ctx A pointer to an iio_context structure

iio_context_find_device

@brief Try to find a device structure by its name of ID @param ctx A pointer to an iio_context structure @param name A NULL-terminated string corresponding to the name or the ID of the device to search for @return On success, a pointer to an iio_device structure @return If the name or ID does not correspond to any known device, NULL is returned

iio_context_get_attr

@brief Retrieve the name and value of a context-specific attribute @param ctx A pointer to an iio_context structure @param index The index corresponding to the attribute @param name A pointer to a const char * pointer (NULL accepted) @param value A pointer to a const char * pointer (NULL accepted) @return On success, 0 is returned @return On error, a negative errno code is returned

iio_context_get_attr_value

@brief Retrieve the value of a context-specific attribute @param ctx A pointer to an iio_context structure @param name The name of the context attribute to read @return On success, a pointer to a static NULL-terminated string @return If the name does not correspond to any attribute, NULL is returned

iio_context_get_attrs_count

@brief Get the number of context-specific attributes @param ctx A pointer to an iio_context structure @return The number of context-specific attributes

iio_context_get_description

@brief Get a description of the given context @param ctx A pointer to an iio_context structure @return A pointer to a static NULL-terminated string

iio_context_get_device

@brief Get the device present at the given index @param ctx A pointer to an iio_context structure @param index The index corresponding to the device @return On success, a pointer to an iio_device structure @return If the index is invalid, NULL is returned

iio_context_get_devices_count

@brief Enumerate the devices found in the given context @param ctx A pointer to an iio_context structure @return The number of devices found

iio_context_get_name

@brief Get the name of the given context @param ctx A pointer to an iio_context structure @return A pointer to a static NULL-terminated string

iio_context_get_version

@brief Get the version of the backend in use @param ctx A pointer to an iio_context structure @param major A pointer to an unsigned integer (NULL accepted) @param minor A pointer to an unsigned integer (NULL accepted) @param git_tag A pointer to a 8-characters buffer (NULL accepted) @return On success, 0 is returned @return On error, a negative errno code is returned

iio_context_get_xml

@brief Obtain a XML representation of the given context @param ctx A pointer to an iio_context structure @return A pointer to a static NULL-terminated string

iio_context_info_get_description

@brief Get a description of a discovered context @param info A pointer to an iio_context_info structure @return A pointer to a static NULL-terminated string

iio_context_info_get_uri

@brief Get the URI of a discovered context @param info A pointer to an iio_context_info structure @return A pointer to a static NULL-terminated string

iio_context_info_list_free

@brief Free a context info list @param info A pointer to a 'const struct iio_context_info *' typed variable

iio_context_set_timeout

@brief Set a timeout for I/O operations @param ctx A pointer to an iio_context structure @param timeout_ms A positive integer representing the time in milliseconds after which a timeout occurs. A value of 0 is used to specify that no timeout should occur. @return On success, 0 is returned @return On error, a negative errno code is returned

iio_create_context_from_uri

@brief Create a context from a URI description @param uri A URI describing the context location @return On success, a pointer to a iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_default_context

@brief Create a context from local or remote IIO devices @return On success, A pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_local_context

@brief Create a context from local IIO devices (Linux only) @return On success, A pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_network_context

@brief Create a context from the network @param host Hostname, IPv4 or IPv6 address where the IIO Daemon is running @return On success, a pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_scan_context

@brief Create a scan context @param backend A NULL-terminated string containing the backend to use for scanning. If NULL, all the available backends are used. @param flags Unused for now. Set to 0. @return on success, a pointer to a iio_scan_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_xml_context

@brief Create a context from a XML file @param xml_file Path to the XML file to open @return On success, A pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_create_xml_context_mem

@brief Create a context from XML data in memory @param xml Pointer to the XML data in memory @param len Length of the XML string in memory (excluding the final \0) @return On success, A pointer to an iio_context structure @return On failure, NULL is returned and errno is set appropriately

iio_device_attr_read

@brief Read the content of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param dst A pointer to the memory area where the NULL-terminated string corresponding to the value read will be stored @param len The available length of the memory area, in bytes @return On success, the number of bytes written to the buffer @return On error, a negative errno code is returned

iio_device_attr_read_all

@brief Read the content of all device-specific attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_read_bool

@brief Read the content of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a bool variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_read_double

@brief Read the content of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a double variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_read_longlong

@brief Read the content of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a long long variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_write

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A NULL-terminated string to set the attribute to @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_attr_write_all

@brief Set the values of all device-specific attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_write_bool

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A bool value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_write_double

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A double value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_write_longlong

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A long long value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_attr_write_raw

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A pointer to the data to be written @param len The number of bytes that should be written @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_buffer_attr_read

@brief Read the content of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param dst A pointer to the memory area where the NULL-terminated string corresponding to the value read will be stored @param len The available length of the memory area, in bytes @return On success, the number of bytes written to the buffer @return On error, a negative errno code is returned

iio_device_buffer_attr_read_all

@brief Read the content of all buffer-specific attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_read_bool

@brief Read the content of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a bool variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_read_double

@brief Read the content of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a double variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_read_longlong

@brief Read the content of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A pointer to a long long variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_write

@brief Set the value of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A NULL-terminated string to set the attribute to @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_buffer_attr_write_all

@brief Set the values of all buffer-specific attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_write_bool

@brief Set the value of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A bool value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_write_double

@brief Set the value of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A double value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_write_longlong

@brief Set the value of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param val A long long value to set the attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_buffer_attr_write_raw

@brief Set the value of the given buffer-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A pointer to the data to be written @param len The number of bytes that should be written @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_create_buffer

@brief Create an input or output buffer associated to the given device @param dev A pointer to an iio_device structure @param samples_count The number of samples that the buffer should contain @param cyclic If True, enable cyclic mode @return On success, a pointer to an iio_buffer structure @return On error, NULL is returned, and errno is set to the error code

iio_device_debug_attr_read

@brief Read the content of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param dst A pointer to the memory area where the NULL-terminated string corresponding to the value read will be stored @param len The available length of the memory area, in bytes @return On success, the number of bytes written to the buffer @return On error, a negative errno code is returned

iio_device_debug_attr_read_all

@brief Read the content of all debug attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_read_bool

@brief Read the content of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A pointer to a bool variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_read_double

@brief Read the content of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A pointer to a double variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_read_longlong

@brief Read the content of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A pointer to a long long variable where the value should be stored @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_write

@brief Set the value of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param src A NULL-terminated string to set the debug attribute to @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_debug_attr_write_all

@brief Set the values of all debug attributes @param dev A pointer to an iio_device structure @param cb A pointer to a callback function @param data A pointer that will be passed to the callback function @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_write_bool

@brief Set the value of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A bool value to set the debug attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_write_double

@brief Set the value of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A double value to set the debug attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_write_longlong

@brief Set the value of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param val A long long value to set the debug attribute to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_debug_attr_write_raw

@brief Set the value of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param src A pointer to the data to be written @param len The number of bytes that should be written @return On success, the number of bytes written @return On error, a negative errno code is returned

iio_device_find_attr

@brief Try to find a device-specific attribute by its name @param dev A pointer to an iio_device structure @param name A NULL-terminated string corresponding to the name of the attribute @return On success, a pointer to a static NULL-terminated string @return If the name does not correspond to any known attribute of the given device, NULL is returned

iio_device_find_buffer_attr

@brief Try to find a buffer-specific attribute by its name @param dev A pointer to an iio_device structure @param name A NULL-terminated string corresponding to the name of the attribute @return On success, a pointer to a static NULL-terminated string @return If the name does not correspond to any known attribute of the given device, NULL is returned

iio_device_find_channel

@brief Try to find a channel structure by its name of ID @param dev A pointer to an iio_device structure @param name A NULL-terminated string corresponding to the name or the ID of the channel to search for @param output True if the searched channel is output, False otherwise @return On success, a pointer to an iio_channel structure @return If the name or ID does not correspond to any known channel of the given device, NULL is returned

iio_device_find_debug_attr

@brief Try to find a debug attribute by its name @param dev A pointer to an iio_device structure @param name A NULL-terminated string corresponding to the name of the debug attribute @return On success, a pointer to a static NULL-terminated string @return If the name does not correspond to any known debug attribute of the given device, NULL is returned

iio_device_get_attr

@brief Get the device-specific attribute present at the given index @param dev A pointer to an iio_device structure @param index The index corresponding to the attribute @return On success, a pointer to a static NULL-terminated string @return If the index is invalid, NULL is returned

iio_device_get_attrs_count

@brief Enumerate the device-specific attributes of the given device @param dev A pointer to an iio_device structure @return The number of device-specific attributes found

iio_device_get_buffer_attr

@brief Get the buffer-specific attribute present at the given index @param dev A pointer to an iio_device structure @param index The index corresponding to the attribute @return On success, a pointer to a static NULL-terminated string @return If the index is invalid, NULL is returned

iio_device_get_buffer_attrs_count

@brief Enumerate the buffer-specific attributes of the given device @param dev A pointer to an iio_device structure @return The number of buffer-specific attributes found

iio_device_get_channel

@brief Get the channel present at the given index @param dev A pointer to an iio_device structure @param index The index corresponding to the channel @return On success, a pointer to an iio_channel structure @return If the index is invalid, NULL is returned

iio_device_get_channels_count

@brief Enumerate the channels of the given device @param dev A pointer to an iio_device structure @return The number of channels found

iio_device_get_context

@brief Retrieve a pointer to the iio_context structure @param dev A pointer to an iio_device structure @return A pointer to an iio_context structure

iio_device_get_data

@brief Retrieve a previously associated pointer of an iio_device structure @param dev A pointer to an iio_device structure @return The pointer previously associated if present, or NULL

iio_device_get_debug_attr

@brief Get the debug attribute present at the given index @param dev A pointer to an iio_device structure @param index The index corresponding to the debug attribute @return On success, a pointer to a static NULL-terminated string @return If the index is invalid, NULL is returned

iio_device_get_debug_attrs_count

@brief Enumerate the debug attributes of the given device @param dev A pointer to an iio_device structure @return The number of debug attributes found

iio_device_get_id

@brief Retrieve the device ID (e.g. iio:device0) @param dev A pointer to an iio_device structure @return A pointer to a static NULL-terminated string

iio_device_get_name

@brief Retrieve the device name (e.g. xadc) @param dev A pointer to an iio_device structure @return A pointer to a static NULL-terminated string

iio_device_get_sample_size

@brief Get the current sample size @param dev A pointer to an iio_device structure @return On success, the sample size in bytes @return On error, a negative errno code is returned

iio_device_get_trigger

@brief Retrieve the trigger of a given device @param dev A pointer to an iio_device structure @param trigger a pointer to a pointer of an iio_device structure. The pointed pointer will be set to the address of the iio_device structure corresponding to the associated trigger device. @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_identify_filename

@brief Identify the channel or debug attribute corresponding to a filename @param dev A pointer to an iio_device structure @param filename A NULL-terminated string corresponding to the filename @param chn A pointer to a pointer of an iio_channel structure. The pointed pointer will be set to the address of the iio_channel structure if the filename correspond to the attribute of a channel, or NULL otherwise. @param attr A pointer to a NULL-terminated string. The pointer pointer will be set to point to the name of the attribute corresponding to the filename. @return On success, 0 is returned, and *chn and *attr are modified. @return On error, a negative errno code is returned. *chn and *attr are not modified.

iio_device_is_trigger

@brief Return True if the given device is a trigger @param dev A pointer to an iio_device structure @return True if the device is a trigger, False otherwise

iio_device_reg_read

@brief Get the value of a hardware register @param dev A pointer to an iio_device structure @param address The address of the register @param value A pointer to the variable where the value will be written @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_reg_write

@brief Set the value of a hardware register @param dev A pointer to an iio_device structure @param address The address of the register @param value The value to set the register to @return On success, 0 is returned @return On error, a negative errno code is returned

iio_device_set_data

@brief Associate a pointer to an iio_device structure @param dev A pointer to an iio_device structure @param data The pointer to be associated

iio_device_set_kernel_buffers_count

@brief Configure the number of kernel buffers for a device

iio_device_set_trigger

@brief Associate a trigger to a given device @param dev A pointer to an iio_device structure @param trigger a pointer to the iio_device structure corresponding to the trigger that should be associated. @return On success, 0 is returned @return On error, a negative errno code is returned

iio_get_backend

@brief Retrieve the name of a given backend @param index The index corresponding to the attribute @return On success, a pointer to a static NULL-terminated string @return If the index is invalid, NULL is returned

iio_get_backends_count

@brief Get the number of available backends @return The number of available backends

iio_has_backend

@brief Check if the specified backend is available @param backend The name of the backend to query @return True if the backend is available, false otherwise

iio_library_get_version

@brief Get the version of the libiio library @param major A pointer to an unsigned integer (NULL accepted) @param minor A pointer to an unsigned integer (NULL accepted) @param git_tag A pointer to a 8-characters buffer (NULL accepted)

iio_scan_context_destroy

@brief Destroy the given scan context @param ctx A pointer to an iio_scan_context structure

iio_scan_context_get_info_list

@brief Enumerate available contexts @param ctx A pointer to an iio_scan_context structure @param info A pointer to a 'const struct iio_context_info **' typed variable. The pointed variable will be initialized on success. @returns On success, the number of contexts found. @returns On failure, a negative error number.

iio_strerror

@brief Get a string description of an error code @param err The error code @param dst A pointer to the memory area where the NULL-terminated string corresponding to the error message will be stored @param len The available length of the memory area, in bytes

initstate
initstate_r
jrand48
jrand48_r
l64a
labs
lcong48
lcong48_r
ldiv
llabs
lldiv
lrand48
lrand48_r
malloc
mblen
mbstowcs
mbtowc
mkdtemp
mkstemp
mkstemps
mktemp
mrand48
mrand48_r
nrand48
nrand48_r
on_exit
posix_memalign
pselect
putenv
qecvt
qecvt_r
qfcvt
qfcvt_r
qgcvt
qsort
quick_exit
rand
rand_r
random
random_r
realloc
realpath
rpmatch
seed48
seed48_r
select
setenv
setstate
setstate_r
srand
srand48
srand48_r
srandom
srandom_r
strtod
strtof
strtol
strtold
strtoll
strtoq
strtoul
strtoull
strtouq
system
unsetenv
valloc
wcstombs
wctomb

Type Definitions

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__compar_fn_t
__daddr_t
__dev_t
__fd_mask
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__pthread_list_t
__qaddr_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__useconds_t
blkcnt_t
blksize_t
caddr_t
clock_t
clockid_t
daddr_t
dev_t
fd_mask
fsblkcnt_t
fsfilcnt_t
fsid_t
gid_t
id_t
idtype_t
iio_chan_type

@enum iio_chan_type @brief IIO channel type

iio_modifier

@enum iio_modifier @brief IIO channel modifier

ino_t
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
key_t
loff_t
mode_t
nlink_t
off_t
pid_t
pthread_key_t
pthread_once_t
pthread_spinlock_t
pthread_t
quad_t
register_t
sigset_t
suseconds_t
time_t
timer_t
u_char
u_int
u_int8_t
u_int16_t
u_int32_t
u_int64_t
u_long
u_quad_t
u_short
uid_t
uint
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
ulong
ushort
wchar_t

Unions

__WAIT_STATUS
pthread_attr_t
pthread_barrier_t
pthread_barrierattr_t
pthread_cond_t
pthread_condattr_t
pthread_mutex_t
pthread_mutexattr_t
pthread_rwlock_t
pthread_rwlockattr_t
wait