static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
struct sr_dev_inst *sdi;
sr_info("Probing serial port %s.", conn);
- drvc = di->context;
serial_flush(serial);
/* Let's get a bit of data and see if we can find a packet. */
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_config *src;
struct sr_serial_dev_inst *serial;
char *bufptr;
double version;
- drvc = di->context;
-
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
src = l->data;
static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_config *src;
struct sr_channel *ch;
const char *conn, *serialcomm;
char channel[10];
- drvc = di->context;
-
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
src = l->data;
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- struct drv_context *drvc;
struct sr_config *src;
GSList *devices, *l;
const char *conn, *serialcomm;
devices = NULL;
- drvc = di->context;
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_config *src;
struct sr_serial_dev_inst *serial;
return NULL;
devices = NULL;
- drvc = di->context;
start = g_get_monotonic_time();
while (g_get_monotonic_time() - start < MAX_SCAN_TIME_US) {
if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) {
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct sr_config *src;
struct sr_serial_dev_inst *serial;
GSList *l;
const char *conn, *serialcomm;
- drvc = di->context;
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_dev_inst *sdi;
struct sr_channel *ch;
int num_logic_channels, num_analog_channels, pattern, i;
char channel_name[16];
- drvc = di->context;
-
num_logic_channels = DEFAULT_NUM_LOGIC_CHANNELS;
num_analog_channels = DEFAULT_NUM_ANALOG_CHANNELS;
for (l = options; l; l = l->next) {
const char *serialcomm)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
GSList *devices;
if (serial_open(serial, SERIAL_RDWR) != SR_OK)
return NULL;
- drvc = di->context;
b = buf;
retry = 0;
devices = NULL;
static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_config *src;
struct sr_serial_dev_inst *serial;
gboolean serialcomm_given;
devices = NULL;
- drvc = di->context;
conn = serialcomm = NULL;
serialcomm_given = FALSE;
static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_config *src;
struct sr_serial_dev_inst *serial;
conn = serialcomm = NULL;
devices = NULL;
- drvc = di->context;
-
sr_spew("scan_2x_bd232() called!");
for (l = options; l; l = l->next) {
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
struct sr_dev_inst *sdi;
- struct drv_context *drvc;
struct dev_context *devc;
unsigned int i;
int ret;
(void)options;
- drvc = di->context;
-
/* Allocate memory for our private device context. */
devc = g_malloc0(sizeof(struct dev_context));
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- struct drv_context *drvc;
struct dev_context *devc;
struct sr_dev_inst *sdi;
struct sr_config *src;
const char *conn, *serialcomm;
struct sr_serial_dev_inst *serial;
- drvc = di->context;
-
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
if (!(src = l->data)) {