]> sigrok.org Git - libsigrok.git/blobdiff - hardware/chronovu-la8/protocol.h
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / hardware / chronovu-la8 / protocol.h
index 8092655002f21f40ad3f31280d35342ec2da3b64..2887ba03cd65ef73ac4c22708295a3e0532a504f 100644 (file)
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
-/* Message logging helpers with subsystem-specific prefix string. */
-#define LOG_PREFIX "la8: "
-#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)
+#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 */
@@ -80,7 +74,7 @@ struct dev_context {
 
        /**
         * Trigger pattern (MSB = channel 7, LSB = channel 0).
-        * A 1 bit matches a high signal, 0 matches a low signal on a probe.
+        * A 1 bit matches a high signal, 0 matches a low signal on a channel.
         * Only low/high triggers (but not e.g. rising/falling) are supported.
         */
        uint8_t trigger_pattern;
@@ -113,7 +107,7 @@ struct dev_context {
 /* protocol.c */
 extern const int32_t chronovu_la8_hwcaps[];
 extern uint64_t chronovu_la8_samplerates[];
-extern SR_PRIV const char *chronovu_la8_probe_names[];
+extern SR_PRIV const char *chronovu_la8_channel_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);
@@ -122,7 +116,7 @@ SR_PRIV int la8_read(struct dev_context *devc, uint8_t *buf, int size);
 SR_PRIV int la8_close(struct dev_context *devc);
 SR_PRIV int la8_close_usb_reset_sequencer(struct dev_context *devc);
 SR_PRIV int la8_reset(struct dev_context *devc);
-SR_PRIV int configure_probes(const struct sr_dev_inst *sdi);
+SR_PRIV int configure_channels(const struct sr_dev_inst *sdi);
 SR_PRIV int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate);
 SR_PRIV int la8_read_block(struct dev_context *devc);
 SR_PRIV void send_block_to_session_bus(struct dev_context *devc, int block);