]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok-internal.h
Doxygen: Move error handling stuff to error.c.
[libsigrok.git] / libsigrok-internal.h
index b45b078670f2e0fa6a9efadbfa2966fa38002154..563605720c16b769bdce9abc11cb7c9b48ce9a41 100644 (file)
 #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
 #endif
 
+/* Versions < 2.30.0 of glib don't have g_match_info_unref(). */
+#if !GLIB_CHECK_VERSION(2,30,0)
+#define g_match_info_unref g_match_info_free
+#endif
+
 /* Size of a datastore chunk in units */
 #define DATASTORE_CHUNKSIZE (512 * 1024)
 
+struct sr_context {
+#ifdef HAVE_LIBUSB_1_0
+       libusb_context *libusb_ctx;
+#endif
+};
+
 #ifdef HAVE_LIBUSB_1_0
 struct sr_usb_dev_inst {
        uint8_t bus;
@@ -56,6 +67,11 @@ struct sr_serial_dev_inst {
        int fd;
 };
 
+/* Private driver context. */
+struct drv_context {
+       GSList *instances;
+};
+
 /*--- log.c -----------------------------------------------------------------*/
 
 SR_PRIV int sr_log(int loglevel, const char *format, ...);
@@ -112,6 +128,7 @@ SR_PRIV void *serial_backup_params(int fd);
 SR_PRIV void serial_restore_params(int fd, void *backup);
 SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
                              int stopbits, int flowcontrol);
+SR_PRIV int serial_set_paramstr(int fd, const char *paramstr);
 
 /*--- hardware/common/ezusb.c -----------------------------------------------*/