]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok-internal.h
Bump copyright year
[libsigrok.git] / libsigrok-internal.h
index e63ea9305bdf3180215423686f02ed5bb370c9d9..ff6223c64ff7adf700f5ab43969319457f5659e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the sigrok project.
  *
- * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
+ * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -48,9 +48,6 @@
 #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;
@@ -103,6 +100,7 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi);
 /* 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 GSList *sr_usb_find_usbtmc(libusb_context *usb_ctx);
 SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb);
 #endif
 
@@ -115,6 +113,7 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial);
 /*--- hwdriver.c ------------------------------------------------------------*/
 
 SR_PRIV void sr_hw_cleanup_all(void);
+SR_PRIV struct sr_config *sr_config_new(int key, const void *value);
 SR_PRIV int sr_source_remove(int fd);
 SR_PRIV int sr_source_add(int fd, int events, int timeout,
                          sr_receive_data_callback_t cb, void *cb_data);
@@ -124,6 +123,18 @@ SR_PRIV int sr_source_add(int fd, int events, int timeout,
 SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi,
                            const struct sr_datafeed_packet *packet);
 
+/*--- std.c -----------------------------------------------------------------*/
+
+typedef int (*dev_close_t)(struct sr_dev_inst *sdi);
+
+SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
+                       const char *prefix);
+SR_PRIV int std_hw_dev_acquisition_stop_serial(struct sr_dev_inst *sdi,
+                       void *cb_data, dev_close_t hw_dev_close_fn,
+                       struct sr_serial_dev_inst *serial, const char *prefix);
+SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
+                                      const char *prefix);
+
 /*--- hardware/common/serial.c ----------------------------------------------*/
 
 enum {
@@ -169,6 +180,23 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn);
 SR_PRIV int sr_usb_open(libusb_context *usb_ctx, struct sr_usb_dev_inst *usb);
 #endif
 
+/*--- hardware/common/dmm/es51922.c -----------------------------------------*/
+
+#define ES51922_PACKET_SIZE 14
+
+struct es51922_info {
+       gboolean is_judge, is_vbar, is_voltage, is_auto, is_micro, is_current;
+       gboolean is_milli, is_resistance, is_continuity, is_diode, is_lpf;
+       gboolean is_frequency, is_duty_cycle, is_capacitance, is_temperature;
+       gboolean is_celsius, is_fahrenheit, is_adp, is_sign, is_batt, is_ol;
+       gboolean is_max, is_min, is_rel, is_rmr, is_ul, is_pmax, is_pmin;
+       gboolean is_dc, is_ac, is_vahz, is_hold, is_nano, is_kilo, is_mega;
+};
+
+SR_PRIV gboolean sr_es51922_packet_valid(const uint8_t *buf);
+SR_PRIV int sr_es51922_parse(const uint8_t *buf, float *floatval,
+                            struct sr_datafeed_analog *analog, void *info);
+
 /*--- hardware/common/dmm/fs9922.c ------------------------------------------*/
 
 SR_PRIV int sr_dmm_parse_fs9922(const uint8_t *buf, float *floatval,
@@ -211,7 +239,7 @@ SR_PRIV int sr_metex14_parse(const uint8_t *buf, float *floatval,
 #define RS9LCD_PACKET_SIZE 9
 
 /* Dummy info struct. The parser does not use it. */
-struct rs9lcd_info {};
+struct rs9lcd_info { int dummy; };
 
 SR_PRIV gboolean sr_rs9lcd_packet_valid(const uint8_t *buf);
 SR_PRIV int sr_rs9lcd_parse(const uint8_t *buf, float *floatval,