#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <glib.h>
#include "sigrok.h"
#include "sigrok-internal.h"
Go to the source code of this file.
Functions | |
SR_API struct sr_dev_driver ** | sr_driver_list (void) |
Return the list of supported hardware drivers. More... | |
SR_API int | sr_driver_init (struct sr_dev_driver *driver) |
Initialize a hardware driver. More... | |
SR_PRIV void | sr_hw_cleanup_all (void) |
SR_PRIV struct sr_dev_inst * | sr_dev_inst_new (int index, int status, const char *vendor, const char *model, const char *version) |
SR_PRIV struct sr_dev_inst * | sr_dev_inst_get (GSList *dev_insts, int dev_index) |
SR_PRIV void | sr_dev_inst_free (struct sr_dev_inst *sdi) |
SR_PRIV struct sr_usb_dev_inst * | sr_usb_dev_inst_new (uint8_t bus, uint8_t address, struct libusb_device_handle *hdl) |
SR_PRIV void | sr_usb_dev_inst_free (struct sr_usb_dev_inst *usb) |
SR_PRIV struct sr_serial_dev_inst * | sr_serial_dev_inst_new (const char *port, int fd) |
SR_PRIV void | sr_serial_dev_inst_free (struct sr_serial_dev_inst *serial) |
SR_API gboolean | sr_driver_hwcap_exists (struct sr_dev_driver *driver, int hwcap) |
Find out if a hardware driver has a specific capability. More... | |
SR_API struct sr_hwcap_option * | sr_hw_hwcap_get (int hwcap) |
Get a hardware driver capability option. More... | |
SR_PRIV int | sr_source_remove (int fd) |
SR_PRIV int | sr_source_add (int fd, int events, int timeout, sr_receive_data_callback_t cb, void *cb_data) |
Variables | |
SR_API struct sr_hwcap_option | sr_hwcap_options [] |
SR_PRIV struct sr_dev_driver | demo_driver_info |
SR_PRIV struct sr_dev_driver | ols_driver_info |
SR_PRIV struct sr_dev_driver | zeroplus_logic_cube_driver_info |
SR_PRIV struct sr_dev_driver | asix_sigma_driver_info |
SR_PRIV struct sr_dev_driver | chronovu_la8_driver_info |
SR_PRIV struct sr_dev_driver | fx2lafw_driver_info |
SR_PRIV void sr_dev_inst_free | ( | struct sr_dev_inst * | sdi | ) |
Definition at line 193 of file hwdriver.c.
References sr_dev_inst::model, sr_dev_inst::priv, sr_dev_inst::vendor, and sr_dev_inst::version.
|
read |
Definition at line 178 of file hwdriver.c.
References sr_dev_inst::index, and sr_warn().
|
read |
Definition at line 157 of file hwdriver.c.
References sr_dev_inst::index, sr_dev_inst::inst_type, sr_dev_inst::model, sr_dev_inst::priv, sr_err(), sr_dev_inst::status, sr_dev_inst::vendor, and sr_dev_inst::version.
SR_API gboolean sr_driver_hwcap_exists | ( | struct sr_dev_driver * | driver, |
int | hwcap | ||
) |
Find out if a hardware driver has a specific capability.
driver | The hardware driver in which to search for the capability. |
hwcap | The capability to find in the list. |
Definition at line 262 of file hwdriver.c.
References sr_dev_driver::hwcap_get_all, and sr_err().
SR_API int sr_driver_init | ( | struct sr_dev_driver * | driver | ) |
Initialize a hardware driver.
The specified driver is initialized, and all devices discovered by the driver are instantiated.
driver | The driver to initialize. |
Definition at line 115 of file hwdriver.c.
References sr_dev_driver::dev_info_get, sr_dev_driver::init, sr_dev_driver::name, sr_dbg(), sr_dev_new(), sr_dev_probe_add(), SR_DI_NUM_PROBES, SR_DI_PROBE_NAMES, and sr_warn().
Referenced by sr_dev_scan().
|
read |
Return the list of supported hardware drivers.
Definition at line 100 of file hwdriver.c.
Referenced by sr_dev_scan(), and sr_hw_cleanup_all().
SR_PRIV void sr_hw_cleanup_all | ( | void | ) |
Definition at line 145 of file hwdriver.c.
References sr_dev_driver::cleanup, and sr_driver_list().
Referenced by sr_exit().
|
read |
Get a hardware driver capability option.
hwcap | The capability to get. |
Definition at line 292 of file hwdriver.c.
References sr_hwcap_option::hwcap.
SR_PRIV void sr_serial_dev_inst_free | ( | struct sr_serial_dev_inst * | serial | ) |
Definition at line 247 of file hwdriver.c.
|
read |
Definition at line 231 of file hwdriver.c.
References sr_err().
SR_PRIV int sr_source_add | ( | int | fd, |
int | events, | ||
int | timeout, | ||
sr_receive_data_callback_t | cb, | ||
void * | cb_data | ||
) |
Definition at line 311 of file hwdriver.c.
References sr_session_source_add().
SR_PRIV int sr_source_remove | ( | int | fd | ) |
Definition at line 306 of file hwdriver.c.
References sr_session_source_remove().
SR_PRIV void sr_usb_dev_inst_free | ( | struct sr_usb_dev_inst * | usb | ) |
Definition at line 221 of file hwdriver.c.
|
read |
Definition at line 204 of file hwdriver.c.
References sr_err().
SR_PRIV struct sr_dev_driver asix_sigma_driver_info |
Definition at line 1430 of file asix-sigma.c.
SR_PRIV struct sr_dev_driver chronovu_la8_driver_info |
Definition at line 1114 of file chronovu-la8.c.
SR_PRIV struct sr_dev_driver demo_driver_info |
SR_PRIV struct sr_dev_driver fx2lafw_driver_info |
SR_PRIV struct sr_dev_driver ols_driver_info |
SR_API struct sr_hwcap_option sr_hwcap_options[] |
Definition at line 34 of file hwdriver.c.
SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info |
Definition at line 731 of file zeroplus.c.