Crate libiio_sys
source ·Expand description
Structs
@defgroup Debug Debug and low-level functions
@{
@struct iio_data_format
@brief Contains the format of a data sample.
Constants
Functions
a64l⚠
abs⚠
atof⚠
atoi⚠
atol⚠
div⚠
ecvt⚠
exit⚠
fcvt⚠
free⚠
gcvt⚠
@brief Cancel all buffer operations
@param buf The buffer for which operations should be canceled
@brief Destroy the given buffer
@param buf A pointer to an iio_buffer structure
@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
@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
@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.
@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
@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
@brief Get a pollable file descriptor
@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
@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
@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
@brief Make iio_buffer_refill() and iio_buffer_push() blocking or not
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@brief Disable the given channel
@param chn A pointer to an iio_channel structure
@brief Enable the given channel
@param chn A pointer to an iio_channel structure
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@brief Get the type of the given channel
@param chn A pointer to an iio_channel structure
@return The type of the channel
@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
@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
@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
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
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
@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
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
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
@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
@brief Destroy the given context
@param ctx A pointer to an iio_context structure
@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
@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
@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
@brief Get the number of context-specific attributes
@param ctx A pointer to an iio_context structure
@return The number of context-specific attributes
@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
@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
@brief Enumerate the devices found in the given context
@param ctx A pointer to an iio_context structure
@return The number of devices found
@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
@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
@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
@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
@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
@brief Free a context info list
@param info A pointer to a ‘const struct iio_context_info *’ typed variable
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@brief Enumerate the channels of the given device
@param dev A pointer to an iio_device structure
@return The number of channels found
@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
@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
@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
@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
@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
@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
@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
@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
@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.
@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
@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
@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
@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
@brief Configure the number of kernel buffers for a device
@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
@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
@brief Get the number of available backends
@return The number of available backends
@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
@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)
@brief Destroy the given scan context
@param ctx A pointer to an iio_scan_context structure
@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.
@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
l64a⚠
labs⚠
ldiv⚠
rand⚠
Type Definitions
@enum iio_chan_type
@brief IIO channel type
@enum iio_modifier
@brief IIO channel modifier