![]() |
libsigrok
0.2.2
sigrok hardware access and backend library
|
Hardware driver handling in libsigrok. More...
#include <stdlib.h>#include <stdio.h>#include <sys/types.h>#include <dirent.h>#include <string.h>#include <glib.h>#include "config.h"#include "libsigrok.h"#include "libsigrok-internal.h"
Include dependency graph for hwdriver.c:Go to the source code of this file.
Macros | |
| #define | LOG_PREFIX "hwdriver: " |
| #define | sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args) |
| #define | sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args) |
| #define | sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args) |
| #define | sr_info(s, args...) sr_info(LOG_PREFIX s, ## args) |
| #define | sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args) |
| #define | sr_err(s, args...) sr_err(LOG_PREFIX s, ## args) |
Functions | |
| struct sr_dev_driver ** | sr_driver_list (void) |
| Return the list of supported hardware drivers. More... | |
| int | sr_driver_init (struct sr_context *ctx, struct sr_dev_driver *driver) |
| Initialize a hardware driver. More... | |
| GSList * | sr_driver_scan (struct sr_dev_driver *driver, GSList *options) |
| Tell a hardware driver to scan for devices. More... | |
| int | sr_config_get (const struct sr_dev_driver *driver, int key, GVariant **data, const struct sr_dev_inst *sdi) |
| Returns information about the given driver or device instance. More... | |
| int | sr_config_set (const struct sr_dev_inst *sdi, int key, GVariant *data) |
| Set a configuration key in a device instance. More... | |
| int | sr_config_list (const struct sr_dev_driver *driver, int key, GVariant **data, const struct sr_dev_inst *sdi) |
| List all possible values for a configuration key. More... | |
| struct sr_config_info * | sr_config_info_get (int key) |
| Get information about a configuration key. More... | |
| struct sr_config_info * | sr_config_info_name_get (const char *optname) |
| Get information about an configuration key, by name. More... | |
Hardware driver handling in libsigrok.
Definition in file hwdriver.c.
| #define LOG_PREFIX "hwdriver: " |
Definition at line 31 of file hwdriver.c.
| #define sr_dbg | ( | s, | |
| args... | |||
| ) | sr_dbg(LOG_PREFIX s, ## args) |
Definition at line 34 of file hwdriver.c.
| #define sr_err | ( | s, | |
| args... | |||
| ) | sr_err(LOG_PREFIX s, ## args) |
Definition at line 37 of file hwdriver.c.
Referenced by sr_driver_init(), and sr_driver_scan().
| #define sr_info | ( | s, | |
| args... | |||
| ) | sr_info(LOG_PREFIX s, ## args) |
Definition at line 35 of file hwdriver.c.
| #define sr_log | ( | l, | |
| s, | |||
| args... | |||
| ) | sr_log(l, LOG_PREFIX s, ## args) |
Definition at line 32 of file hwdriver.c.
| #define sr_spew | ( | s, | |
| args... | |||
| ) | sr_spew(LOG_PREFIX s, ## args) |
Definition at line 33 of file hwdriver.c.
Referenced by sr_driver_init(), and sr_driver_scan().
| #define sr_warn | ( | s, | |
| args... | |||
| ) | sr_warn(LOG_PREFIX s, ## args) |
Definition at line 36 of file hwdriver.c.
1.8.5