![]() |
libsigrok
0.3.0
sigrok hardware access and backend library
|
Device driver data. More...
#include <libsigrok.h>
Data Fields | |
char * | name |
Driver name. More... | |
char * | longname |
Long name. More... | |
int | api_version |
API version (currently 1). More... | |
int(* | init )(struct sr_context *sr_ctx) |
Called when driver is loaded, e.g. More... | |
int(* | cleanup )(void) |
Called before driver is unloaded. More... | |
GSList *(* | scan )(GSList *options) |
Scan for devices. More... | |
GSList *(* | dev_list )(void) |
Get list of device instances the driver knows about. More... | |
int(* | dev_clear )(void) |
Clear list of devices the driver knows about. More... | |
int(* | config_get )(int id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
Query value of a configuration key in driver or given device instance. More... | |
int(* | config_set )(int id, GVariant *data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
Set value of a configuration key in driver or a given device instance. More... | |
int(* | config_channel_set )(const struct sr_dev_inst *sdi, struct sr_channel *ch, unsigned int changes) |
Channel status change. More... | |
int(* | config_commit )(const struct sr_dev_inst *sdi) |
Apply configuration settings to the device hardware. More... | |
int(* | config_list )(int info_id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
List all possible values for a configuration key in a device instance. More... | |
int(* | dev_open )(struct sr_dev_inst *sdi) |
Open device. More... | |
int(* | dev_close )(struct sr_dev_inst *sdi) |
Close device. More... | |
int(* | dev_acquisition_start )(const struct sr_dev_inst *sdi, void *cb_data) |
Begin data acquisition on the specified device. More... | |
int(* | dev_acquisition_stop )(struct sr_dev_inst *sdi, void *cb_data) |
End data acquisition on the specified device. More... | |
void * | priv |
Device driver private data. More... | |
Device driver data.
See also http://sigrok.org/wiki/Hardware_driver_API .
Definition at line 891 of file libsigrok.h.
int sr_dev_driver::api_version |
API version (currently 1).
Definition at line 898 of file libsigrok.h.
int(* sr_dev_driver::cleanup) (void) |
Called before driver is unloaded.
Driver must free all resouces held by it.
Definition at line 903 of file libsigrok.h.
int(* sr_dev_driver::config_channel_set) (const struct sr_dev_inst *sdi, struct sr_channel *ch, unsigned int changes) |
Channel status change.
Definition at line 931 of file libsigrok.h.
Referenced by sr_dev_channel_enable(), and sr_dev_trigger_set().
int(* sr_dev_driver::config_commit) (const struct sr_dev_inst *sdi) |
Apply configuration settings to the device hardware.
Definition at line 935 of file libsigrok.h.
Referenced by sr_config_commit().
int(* sr_dev_driver::config_get) (int id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
Query value of a configuration key in driver or given device instance.
Definition at line 921 of file libsigrok.h.
Referenced by sr_config_get().
int(* sr_dev_driver::config_list) (int info_id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
List all possible values for a configuration key in a device instance.
Definition at line 939 of file libsigrok.h.
Referenced by sr_config_list(), sr_dev_has_option(), and sr_parse_triggerstring().
int(* sr_dev_driver::config_set) (int id, GVariant *data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) |
Set value of a configuration key in driver or a given device instance.
Definition at line 926 of file libsigrok.h.
Referenced by sr_config_set(), and sr_session_load().
int(* sr_dev_driver::dev_acquisition_start) (const struct sr_dev_inst *sdi, void *cb_data) |
Begin data acquisition on the specified device.
Definition at line 949 of file libsigrok.h.
Referenced by sr_session_start().
int(* sr_dev_driver::dev_acquisition_stop) (struct sr_dev_inst *sdi, void *cb_data) |
End data acquisition on the specified device.
Definition at line 952 of file libsigrok.h.
int(* sr_dev_driver::dev_clear) (void) |
Clear list of devices the driver knows about.
Definition at line 917 of file libsigrok.h.
Referenced by sr_dev_clear().
int(* sr_dev_driver::dev_close) (struct sr_dev_inst *sdi) |
GSList*(* sr_dev_driver::dev_list) (void) |
Get list of device instances the driver knows about.
Definition at line 915 of file libsigrok.h.
Referenced by sr_dev_list().
int(* sr_dev_driver::dev_open) (struct sr_dev_inst *sdi) |
Open device.
Definition at line 945 of file libsigrok.h.
Referenced by sr_dev_open(), and sr_session_dev_add().
int(* sr_dev_driver::init) (struct sr_context *sr_ctx) |
Called when driver is loaded, e.g.
program startup.
Definition at line 900 of file libsigrok.h.
Referenced by sr_driver_init(), and sr_session_load().
char* sr_dev_driver::longname |
char* sr_dev_driver::name |
Driver name.
Lowercase a-z, 0-9 and dashes (-) only.
Definition at line 894 of file libsigrok.h.
Referenced by sr_driver_init(), and sr_driver_scan().
void* sr_dev_driver::priv |
Device driver private data.
Initialized by init().
Definition at line 957 of file libsigrok.h.
Referenced by sr_driver_scan().
GSList*(* sr_dev_driver::scan) (GSList *options) |
Scan for devices.
Driver should do all initialisation required. Can be called several times, e.g. with different port options.
NULL | Error or no devices found. |
other | GSList of a struct sr_dev_inst for each device. Must be freed by caller! |
Definition at line 910 of file libsigrok.h.
Referenced by sr_driver_scan().