]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/protocol.h
ols: add swap channels feature
[libsigrok.git] / hardware / openbench-logic-sniffer / protocol.h
index 3322409f06bd9c5a9ea6ac776c9adb929317fc8b..402c6246c56b7b861674db90a58e207999be5a17 100644 (file)
@@ -46,6 +46,7 @@
 /* Command opcodes */
 #define CMD_RESET                  0x00
 #define CMD_RUN                    0x01
+#define CMD_TESTMODE               0x03
 #define CMD_ID                     0x02
 #define CMD_METADATA               0x04
 #define CMD_SET_FLAGS              0x82
@@ -74,6 +75,9 @@
 #define FLAG_CLOCK_EXTERNAL        0x40
 #define FLAG_CLOCK_INVERTED        0x80
 #define FLAG_RLE                   0x0100
+#define FLAG_SWAP_PROBES           0x0200
+#define FLAG_EXTERNAL_TEST_MODE    0x0400
+#define FLAG_INTERNAL_TEST_MODE    0x0800
 
 /* Private, per-device-instance driver context. */
 struct dev_context {
@@ -100,7 +104,7 @@ struct dev_context {
        int num_bytes;
 
        /* Temporary variables */
-       int rle_count;
+       unsigned int rle_count;
        unsigned char sample[4];
        unsigned char tmp_sample[4];
        unsigned char *raw_sample_buf;