SR_PRIV struct sr_dev_driver agdmm_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "agilent-dmm",
.longname = "Agilent U12xx series DMMs",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver appa_55ii_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "appa-55ii",
.longname = "APPA 55II",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver arachnid_labs_re_load_pro_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "arachnid-labs-re-load-pro",
.longname = "Arachnid Labs Re:load Pro",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return std_dev_clear(di, sigma_clear_helper);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "asix-sigma",
.longname = "ASIX SIGMA/SIGMA2",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
{
struct sr_dev_inst *sdi;
.name = "atten-pps3203",
.longname = "Atten PPS3203T-3S",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan_3203,
.dev_list = std_dev_list,
SR_HZ(1),
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "baylibre-acme",
.longname = "BayLibre ACME (Another Cute Measurement Equipment)",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_HZ(1),
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct dev_context *beaglelogic_devc_alloc(void)
{
struct dev_context *devc;
.name = "beaglelogic",
.longname = "BeagleLogic",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
GSList *usb_devices, *devices, *l;
.name = "brymen-bm86x",
.longname = "Brymen BM86X",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver brymen_bm857_driver_info;
static struct sr_dev_driver *di = &brymen_bm857_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *brymen_scan(const char *conn, const char *serialcomm)
{
struct sr_dev_inst *sdi;
.name = "brymen-bm857",
.longname = "Brymen BM857",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "cem-dt-885x",
.longname = "CEM DT-885x",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
},
};
-static int init(struct sr_context *sr_ctx, int idx)
-{
- return std_init(center_devs[idx].di, sr_ctx);
-}
-
static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
{
int i;
}
/* Driver-specific API function wrappers */
-#define HW_INIT(X) \
-static int init_##X(struct sr_dev_driver *d, \
- struct sr_context *sr_ctx) { (void)d; return init(sr_ctx, X); }
#define HW_SCAN(X) \
static GSList *scan_##X(struct sr_dev_driver *d, GSList *options) { \
(void)d; return scan(options, X); }
/* Driver structs and API function wrappers */
#define DRV(ID, ID_UPPER, NAME, LONGNAME) \
-HW_INIT(ID_UPPER) \
HW_SCAN(ID_UPPER) \
HW_DEV_ACQUISITION_START(ID_UPPER) \
SR_PRIV struct sr_dev_driver ID##_driver_info = { \
.name = NAME, \
.longname = LONGNAME, \
.api_version = 1, \
- .init = init_##ID_UPPER, \
+ .init = std_init, \
.cleanup = std_cleanup, \
.scan = scan_##ID_UPPER, \
.dev_list = std_dev_list, \
return std_dev_clear(di, clear_helper);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static int add_device(int model, struct libusb_device_descriptor *des,
const char *serial_num, const char *connection_id,
libusb_device *usbdev, GSList **devices)
.name = "chronovu-la",
.longname = "ChronoVu LA8/LA16",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver colead_slm_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "colead-slm",
.longname = "Colead SLM",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "conrad-digi-35-cpu",
.longname = "Conrad DIGI 35 CPU",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
static int dev_acquisition_stop(struct sr_dev_inst *sdi);
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
{
double t, frequency;
.name = "demo",
.longname = "Demo driver and pattern generator",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver deree_de5000_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static int dev_clear(const struct sr_dev_driver *di)
{
return std_dev_clear(di, es51919_serial_clean);
.name = "deree-de5000",
.longname = "DER EE DE-5000",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
{ FLUKE_289, "289", 100, 1000 },
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
const char *serialcomm)
{
.name = "fluke-dmm",
.longname = "Fluke 18x/28x series DMMs",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
&ft232r_desc,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSList **devices)
{
struct libusb_device_descriptor usb_desc;
.name = "ftdi-la",
.longname = "FTDI LA",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "fx2lafw",
.longname = "fx2lafw (generic driver for FX2 based LAs)",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
* Need to implement device-specific lists.
*/
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
/**
* Read single byte from serial port.
*
.name = "gmc-mh-1x-2x-rs232",
.longname = "Gossen Metrawatt Metrahit 1x/2x, RS232 interface",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan_1x_2x_rs232,
.dev_list = std_dev_list,
.name = "gmc-mh-2x-bd232",
.longname = "Gossen Metrawatt Metrahit 2x, BD232/SI232-II interface",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan_2x_bd232,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver gwinstek_gds_800_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
{
struct dev_context *devc;
.name = "gwinstek-gds-800",
.longname = "GW Instek GDS-800 series",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
CG_DIGITAL,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static int check_manufacturer(const char *manufacturer)
{
unsigned int i;
.name = "hameg-hmo",
.longname = "Hameg HMO",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return std_dev_clear(di, clear_dev_context);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "hantek-6xxx",
.longname = "Hantek 6xxx",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return std_dev_clear(di, clear_dev_context);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "hantek-dso",
.longname = "Hantek DSO",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return sdi;
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
return sr_scpi_scan(di->context, options, probe_device);
.name = "hp-3457a",
.longname = "HP 3457A",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
0x00, 0x08, 0x04
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan_port(GSList *devices, struct sr_dev_driver *di,
struct parport *port)
{
.name = "hung-chang-dso-2100",
.longname = "Hung-Chang DSO-2100",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
GSList *usb_devices, *devices, *l;
.name = "ikalogic-scanalogic2",
.longname = "IKALOGIC Scanalogic-2",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return std_dev_clear(di, clear_helper);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "ikalogic-scanaplus",
.longname = "IKALOGIC ScanaPLUS",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static int scan_kecheng(struct sr_dev_driver *di,
struct sr_usb_dev_inst *usb, char **model)
{
.name = "kecheng-kc-330b",
.longname = "Kecheng KC-330B",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct scale_info *scale;
.name = ID, \
.longname = VENDOR " " MODEL, \
.api_version = 1, \
- .init = init, \
+ .init = std_init, \
.cleanup = std_cleanup, \
.scan = scan, \
.dev_list = std_dev_list, \
SR_PRIV struct sr_dev_driver korad_kaxxxxp_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "korad-kaxxxxp",
.longname = "Korad KAxxxxP",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "lascar-el-usb",
.longname = "Lascar EL-USB",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver lecroy_logicstudio_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *create_device(struct sr_dev_driver *di,
struct sr_usb_dev_inst *usb, enum sr_dev_inst_status status,
int64_t fw_updated)
.name = "lecroy-logicstudio",
.longname = "LeCroy LogicStudio",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return ret;
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
int i;
.name = "link-mso19",
.longname = "Link Instruments MSO-19",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver manson_hcs_3xxx_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
int i, model_id;
.name = "manson-hcs-3xxx",
.longname = "Manson HCS-3xxx",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver maynuo_m97_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *probe_device(struct sr_modbus_dev_inst *modbus)
{
const struct maynuo_m97_model *model = NULL;
.name = "maynuo-m97",
.longname = "maynuo M97/M98 series",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
},
};
-static int init(struct sr_context *sr_ctx, int idx)
-{
- return std_init(mic_devs[idx].di, sr_ctx);
-}
-
static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
{
struct sr_dev_inst *sdi;
}
/* Driver-specific API function wrappers */
-#define HW_INIT(X) \
-static int init_##X(struct sr_dev_driver *di, struct sr_context *sr_ctx) { \
- (void)di; return init(sr_ctx, X); }
#define HW_SCAN(X) \
static GSList *scan_##X(struct sr_dev_driver *di, GSList *options) { \
(void)di; return scan(options, X); }
/* Driver structs and API function wrappers */
#define DRV(ID, ID_UPPER, NAME, LONGNAME) \
-HW_INIT(ID_UPPER) \
HW_SCAN(ID_UPPER) \
HW_CONFIG_LIST(ID_UPPER) \
HW_DEV_ACQUISITION_START(ID_UPPER) \
.name = NAME, \
.longname = LONGNAME, \
.api_version = 1, \
- .init = init_##ID_UPPER, \
+ .init = std_init, \
.cleanup = std_cleanup, \
.scan = scan_##ID_UPPER, \
.dev_list = std_dev_list, \
},
};
-static int init_lps301(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
/** Send command to device with va_list.
*/
SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args)
.name = "motech-lps-301",
.longname = "Motech LPS-301",
.api_version = 1,
- .init = init_lps301,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan_lps301,
.dev_list = std_dev_list,
return nameref[type - 1][(drv == &siemens_b102x_driver_info)];
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *drv, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "norma-dmm",
.longname = "Norma DM9x0 DMMs",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
.name = "siemens-b102x",
.longname = "Siemens B102x DMMs",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver ols_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_config *src;
.name = "ols",
.longname = "Openbench Logic Sniffer",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver p_ols_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "p-ols",
.longname = "Pipistrello OLS",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return std_dev_clear(di, clear_helper);
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
{
struct dev_context *devc;
.name = "rigol-ds",
.longname = "Rigol DS",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_MHZ(100),
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static gboolean check_conf_profile(libusb_device *dev)
{
struct libusb_device_descriptor des;
.name = "saleae-logic16",
.longname = "Saleae Logic16",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
{ SR_MQ_FREQUENCY, SCPI_CMD_GET_MEAS_FREQUENCY, "F" },
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
{
struct dev_context *devc;
.name = "scpi-pps",
.longname = "SCPI PPS",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct dmm_info *dmm;
.name = ID, \
.longname = VENDOR " " MODEL, \
.api_version = 1, \
- .init = init, \
+ .init = std_init, \
.cleanup = std_cleanup, \
.scan = scan, \
.dev_list = std_dev_list, \
[EDGE_NEGATIVE] = "f",
};
-/* Initialize the SysClk LWLA driver.
- */
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
/* Create a new sigrok device instance for the indicated LWLA model.
*/
static struct sr_dev_inst *dev_inst_new(const struct model_info *model)
.name = "sysclk-lwla",
.longname = "SysClk LWLA series",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver teleinfo_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "teleinfo",
.longname = "Teleinfo",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
{ "435", 9, TESTO_x35_REQUEST },
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "testo",
.longname = "Testo",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "tondaj-sl-814",
.longname = "Tondaj SL-814",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
* default of 2400 being used (which will not work with this DMM, of course).
*/
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
GSList *usb_devices, *devices, *l;
.name = ID, \
.longname = VENDOR " " MODEL, \
.api_version = 1, \
- .init = init, \
+ .init = std_init, \
.cleanup = std_cleanup, \
.scan = scan, \
.dev_list = std_dev_list, \
SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info;
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "uni-t-ut32x",
.longname = "UNI-T UT32x",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
SR_CONF_CONN | SR_CONF_GET,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct drv_context *drvc;
.name = "victor-dmm",
.longname = "Victor DMMs",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
CG_DIGITAL,
};
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
{
struct sr_dev_inst *sdi;
.name = "yokogawa-dlm",
.longname = "Yokogawa DL/DLM",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
return SR_OK;
}
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
.name = "zeroplus-logic-cube",
.longname = "ZEROPLUS Logic Cube LAP-C series",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = std_cleanup,
.scan = scan,
.dev_list = std_dev_list,
/* driver callbacks */
-static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
-{
- return std_init(di, sr_ctx);
-}
-
static int dev_clear(const struct sr_dev_driver *di)
{
struct drv_context *drvc;
.name = "virtual-session",
.longname = "Session-emulating driver",
.api_version = 1,
- .init = init,
+ .init = std_init,
.cleanup = dev_clear,
.scan = NULL,
.dev_list = NULL,