+/* Size of a datastore chunk in units */
+#define DATASTORE_CHUNKSIZE (512 * 1024)
+
+#ifdef HAVE_LIBUSB_1_0
+struct sr_usb_dev_inst {
+ uint8_t bus;
+ uint8_t address;
+ struct libusb_device_handle *devhdl;
+};
+#endif
+
+struct sr_serial_dev_inst {
+ char *port;
+ int fd;
+};
+
+#ifdef HAVE_LIBUSB_1_0
+/* USB-specific instances */
+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);
+#endif
+
+/* Serial-specific instances */
+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);
+
+/*--- log.c -----------------------------------------------------------------*/
+
+SR_PRIV int sr_log(int loglevel, const char *format, ...);
+SR_PRIV int sr_spew(const char *format, ...);
+SR_PRIV int sr_dbg(const char *format, ...);
+SR_PRIV int sr_info(const char *format, ...);
+SR_PRIV int sr_warn(const char *format, ...);
+SR_PRIV int sr_err(const char *format, ...);
+