|
libiio
|
Functions | |
| __api __check_ret struct iio_context * | iio_create_default_context (void) |
| Create a context from local or remote IIO devices. More... | |
| __api __check_ret struct iio_context * | iio_create_local_context (void) |
| Create a context from local IIO devices (Linux only) More... | |
| __api __check_ret struct iio_context * | iio_create_network_context (const char *host) |
| Create a context from the network. More... | |
| __api __check_ret struct iio_context * | iio_create_xml_context (const char *xml_file) |
| Create a context from a XML file. More... | |
| __api __check_ret struct iio_context * | iio_create_context_from_uri (const char *uri) |
| Create a context from a URI description. More... | |
| __api __check_ret struct iio_scan_context * | iio_create_scan_context (const char *backend, unsigned int flags) |
| Create a scan context. More... | |
| __api void | iio_scan_context_destroy (struct iio_scan_context *ctx) |
| Destroy the given scan context. More... | |
| __api __check_ret ssize_t | iio_scan_context_get_info_list (struct iio_scan_context *ctx, struct iio_context_info ***info) |
| Enumerate available contexts. More... | |
| __api void | iio_context_info_list_free (struct iio_context_info **info) |
| Free a context info list. More... | |
| __api __check_ret __pure const char * | iio_context_info_get_description (const struct iio_context_info *info) |
| Get a description of a discovered context. More... | |
| __api __check_ret __pure const char * | iio_context_info_get_uri (const struct iio_context_info *info) |
| Get the URI of a discovered context. More... | |
| __api struct iio_scan_block * | iio_create_scan_block (const char *backend, unsigned int flags) |
| Create a scan block. More... | |
| __api void | iio_scan_block_destroy (struct iio_scan_block *blk) |
| Destroy the given scan block. More... | |
| __api ssize_t | iio_scan_block_scan (struct iio_scan_block *blk) |
| Enumerate available contexts via scan block. More... | |
| __api struct iio_context_info * | iio_scan_block_get_info (struct iio_scan_block *blk, unsigned int index) |
| Get the iio_context_info for a particular context. More... | |
| __api void | iio_library_get_version (unsigned int *major, unsigned int *minor, char git_tag[8]) |
| Get the version of the libiio library. More... | |
| __api __check_ret int | iio_context_get_version (const struct iio_context *ctx, unsigned int *major, unsigned int *minor, char git_tag[8]) |
| Get the version of the backend in use. More... | |
| __api __check_ret int | iio_device_set_kernel_buffers_count (const struct iio_device *dev, unsigned int nb_buffers) |
| Configure the number of kernel buffers for a device. More... | |
| __api void | iio_strerror (int err, char *dst, size_t len) |
| Get a string description of an error code. More... | |
| __api __check_ret __cnst bool | iio_has_backend (const char *backend) |
| Check if the specified backend is available. More... | |
| __api __check_ret __cnst unsigned int | iio_get_backends_count (void) |
| Get the number of available backends. More... | |
| __api __check_ret __cnst const char * | iio_get_backend (unsigned int index) |
| Retrieve the name of a given backend. More... | |
| __api __check_ret int iio_context_get_version | ( | const struct iio_context * | ctx, |
| unsigned int * | major, | ||
| unsigned int * | minor, | ||
| char | git_tag[8] | ||
| ) |
Get the version of the backend in use.
| ctx | A pointer to an iio_context structure |
| major | A pointer to an unsigned integer (NULL accepted) |
| minor | A pointer to an unsigned integer (NULL accepted) |
| git_tag | A pointer to a 8-characters buffer (NULL accepted) |
| __api __check_ret __pure const char* iio_context_info_get_description | ( | const struct iio_context_info * | info | ) |
Get a description of a discovered context.
| info | A pointer to an iio_context_info structure |
| __api __check_ret __pure const char* iio_context_info_get_uri | ( | const struct iio_context_info * | info | ) |
Get the URI of a discovered context.
| info | A pointer to an iio_context_info structure |
| __api void iio_context_info_list_free | ( | struct iio_context_info ** | info | ) |
Free a context info list.
| info | A pointer to a 'const struct iio_context_info *' typed variable |
| __api __check_ret struct iio_context* iio_create_context_from_uri | ( | const char * | uri | ) |
Create a context from a URI description.
| uri | A URI describing the context location |
NOTE: The following URIs are supported based on compile time backend support:
Serial backend, "serial:"
Requires:
For example "serial:/dev/ttyUSB0,115200" or "serial:/dev/ttyUSB0,115200,8n1"
| __api __check_ret struct iio_context* iio_create_default_context | ( | void | ) |
Create a context from local or remote IIO devices.
NOTE: This function will create a context with the URI provided in the IIOD_REMOTE environment variable. If not set, a local context will be created instead.
| __api __check_ret struct iio_context* iio_create_local_context | ( | void | ) |
Create a context from local IIO devices (Linux only)
| __api __check_ret struct iio_context* iio_create_network_context | ( | const char * | host | ) |
Create a context from the network.
| host | Hostname, IPv4 or IPv6 address where the IIO Daemon is running |
| __api struct iio_scan_block* iio_create_scan_block | ( | const char * | backend, |
| unsigned int | flags | ||
| ) |
Create a scan block.
| backend | A NULL-terminated string containing the backend to use for scanning. If NULL, all the available backends are used. |
| flags | Unused for now. Set to 0. |
Introduced in version 0.20.
| __api __check_ret struct iio_scan_context* iio_create_scan_context | ( | const char * | backend, |
| unsigned int | flags | ||
| ) |
Create a scan context.
| backend | A NULL-terminated string containing the backend(s) to use for scanning (example: pre version 0.20 : "local", "ip", or "usb"; post version 0.20 can handle multiple, including "local:usb:", "ip:usb:", "local:usb:ip:"). If NULL, all the available backends are used. |
| flags | Unused for now. Set to 0. |
| __api __check_ret struct iio_context* iio_create_xml_context | ( | const char * | xml_file | ) |
Create a context from a XML file.
| xml_file | Path to the XML file to open |
NOTE: The format of the XML must comply to the one returned by iio_context_get_xml.
| __api __check_ret int iio_device_set_kernel_buffers_count | ( | const struct iio_device * | dev, |
| unsigned int | nb_buffers | ||
| ) |
Configure the number of kernel buffers for a device.
This function allows to change the number of buffers on kernel side.
| dev | A pointer to an iio_device structure |
| nb_buffers | The number of buffers |
| __api __check_ret __cnst const char* iio_get_backend | ( | unsigned int | index | ) |
Retrieve the name of a given backend.
| index | The index corresponding to the attribute |
Introduced in version 0.9.
| __api __check_ret __cnst unsigned int iio_get_backends_count | ( | void | ) |
Get the number of available backends.
Introduced in version 0.9.
| __api __check_ret __cnst bool iio_has_backend | ( | const char * | backend | ) |
Check if the specified backend is available.
| backend | The name of the backend to query |
Introduced in version 0.9.
| __api void iio_library_get_version | ( | unsigned int * | major, |
| unsigned int * | minor, | ||
| char | git_tag[8] | ||
| ) |
Get the version of the libiio library.
| major | A pointer to an unsigned integer (NULL accepted) |
| minor | A pointer to an unsigned integer (NULL accepted) |
| git_tag | A pointer to a 8-characters buffer (NULL accepted) |
| __api void iio_scan_block_destroy | ( | struct iio_scan_block * | blk | ) |
Destroy the given scan block.
| blk | A pointer to an iio_scan_block structure |
NOTE: After that function, the iio_scan_block pointer shall be invalid.
Introduced in version 0.20.
| __api struct iio_context_info* iio_scan_block_get_info | ( | struct iio_scan_block * | blk, |
| unsigned int | index | ||
| ) |
Get the iio_context_info for a particular context.
| blk | A pointer to an iio_scan_block structure |
| index | The index corresponding to the context. |
Introduced in version 0.20.
| __api ssize_t iio_scan_block_scan | ( | struct iio_scan_block * | blk | ) |
Enumerate available contexts via scan block.
| blk | A pointer to a iio_scan_block structure. |
Introduced in version 0.20.
| __api void iio_scan_context_destroy | ( | struct iio_scan_context * | ctx | ) |
Destroy the given scan context.
| ctx | A pointer to an iio_scan_context structure |
NOTE: After that function, the iio_scan_context pointer shall be invalid.
| __api __check_ret ssize_t iio_scan_context_get_info_list | ( | struct iio_scan_context * | ctx, |
| struct iio_context_info *** | info | ||
| ) |
Enumerate available contexts.
| ctx | A pointer to an iio_scan_context structure |
| info | A pointer to a 'const struct iio_context_info **' typed variable. The pointed variable will be initialized on success. |
| __api void iio_strerror | ( | int | err, |
| char * | dst, | ||
| size_t | len | ||
| ) |
Get a string description of an error code.
| err | The error code |
| dst | A pointer to the memory area where the NULL-terminated string corresponding to the error message will be stored |
| len | The available length of the memory area, in bytes |
1.8.13