]> sigrok.org Git - libsigrok.git/blobdiff - hardware/chronovu-la8/protocol.h
rigol-ds: Disable key lock when closing device.
[libsigrok.git] / hardware / chronovu-la8 / protocol.h
index 07e04c2fb98d78733890e2d8890d2dd86f71c8ab..146fc112d5955feb4b8fb6c031bb76e665711267 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
  *
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
-/* Message logging helpers with driver-specific prefix string. */
-#define DRIVER_LOG_DOMAIN "la8: "
-#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
-#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
-#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
-#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
-#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
-#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
+#define LOG_PREFIX "chronovu-la8"
 
 #define USB_VENDOR_ID                  0x0403
 #define USB_DESCRIPTION                        "ChronoVu LA8"
@@ -46,6 +39,7 @@
 #define TRIGGER_TYPE                   "01"
 #define SDRAM_SIZE                     (8 * 1024 * 1024)
 #define MIN_NUM_SAMPLES                        1
+#define MAX_NUM_SAMPLES                        SDRAM_SIZE
 
 #define BS                             4096 /* Block size */
 #define NUM_BLOCKS                     2048 /* Number of blocks */
@@ -64,8 +58,7 @@ struct dev_context {
        /** The current sampling limit (in number of samples). */
        uint64_t limit_samples;
 
-       /** TODO */
-       void *session_dev_id;
+       void *cb_data;
 
        /**
         * A buffer containing some (mangled) samples from the device.
@@ -112,10 +105,9 @@ struct dev_context {
 };
 
 /* protocol.c */
-extern SR_PRIV uint64_t supported_samplerates[];
-extern SR_PRIV const int hwcaps[];
-extern SR_PRIV const char *probe_names[];
-extern const struct sr_samplerates samplerates;
+extern const int32_t chronovu_la8_hwcaps[];
+extern uint64_t chronovu_la8_samplerates[];
+extern SR_PRIV const char *chronovu_la8_probe_names[];
 SR_PRIV void fill_supported_samplerates_if_needed(void);
 SR_PRIV int is_valid_samplerate(uint64_t samplerate);
 SR_PRIV uint8_t samplerate_to_divcount(uint64_t samplerate);