libsigrok  0.2.2
sigrok hardware access and backend library
 All Data Structures Files Functions Variables Typedefs Enumerator Macros Groups Pages
Macros | Functions
device.c File Reference

Device handling in libsigrok. More...

#include <stdio.h>
#include <glib.h>
#include "config.h"
#include "libsigrok.h"
#include "libsigrok-internal.h"
+ Include dependency graph for device.c:

Go to the source code of this file.

Macros

#define LOG_PREFIX   "device: "
 
#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

int sr_dev_probe_name_set (const struct sr_dev_inst *sdi, int probenum, const char *name)
 Set the name of the specified probe in the specified device. More...
 
int sr_dev_probe_enable (const struct sr_dev_inst *sdi, int probenum, gboolean state)
 Enable or disable a probe on the specified device. More...
 
int sr_dev_trigger_set (const struct sr_dev_inst *sdi, int probenum, const char *trigger)
 Add a trigger to the specified device (and the specified probe). More...
 
gboolean sr_dev_has_option (const struct sr_dev_inst *sdi, int key)
 Determine whether the specified device instance has the specified capability. More...
 
GSList * sr_dev_list (const struct sr_dev_driver *driver)
 Get the list of devices/instances of the specified driver. More...
 
int sr_dev_clear (const struct sr_dev_driver *driver)
 Clear all devices/instances of the specified driver. More...
 
int sr_dev_open (struct sr_dev_inst *sdi)
 Open the specified device. More...
 
int sr_dev_close (struct sr_dev_inst *sdi)
 Close the specified device. More...
 

Detailed Description

Device handling in libsigrok.

Definition in file device.c.

Macro Definition Documentation

#define LOG_PREFIX   "device: "

Definition at line 27 of file device.c.

#define sr_dbg (   s,
  args... 
)    sr_dbg(LOG_PREFIX s, ## args)

Definition at line 30 of file device.c.

Referenced by sr_log_logdomain_set(), and sr_log_loglevel_set().

#define sr_err (   s,
  args... 
)    sr_err(LOG_PREFIX s, ## args)
#define sr_info (   s,
  args... 
)    sr_info(LOG_PREFIX s, ## args)

Definition at line 31 of file device.c.

#define sr_log (   l,
  s,
  args... 
)    sr_log(l, LOG_PREFIX s, ## args)

Definition at line 28 of file device.c.

#define sr_spew (   s,
  args... 
)    sr_spew(LOG_PREFIX s, ## args)

Definition at line 29 of file device.c.

#define sr_warn (   s,
  args... 
)    sr_warn(LOG_PREFIX s, ## args)

Definition at line 32 of file device.c.