X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fopenbench-logic-sniffer%2Fprotocol.h;h=333605eeefd46ef5b6fa3e8d1e57a17e0d38f9a9;hb=2588e50c63d08245547e9947e67b4247f9102b19;hp=3322409f06bd9c5a9ea6ac776c9adb929317fc8b;hpb=29a27196a13de2ffd9b671185e4b464b9db9b549;p=libsigrok.git diff --git a/hardware/openbench-logic-sniffer/protocol.h b/hardware/openbench-logic-sniffer/protocol.h index 3322409f..333605ee 100644 --- a/hardware/openbench-logic-sniffer/protocol.h +++ b/hardware/openbench-logic-sniffer/protocol.h @@ -26,14 +26,7 @@ #include "libsigrok.h" #include "libsigrok-internal.h" -/* Message logging helpers with subsystem-specific prefix string. */ -#define LOG_PREFIX "ols: " -#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 "ols" #define NUM_PROBES 32 #define NUM_TRIGGER_STAGES 4 @@ -46,6 +39,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,10 +68,14 @@ #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 { /* Fixed device settings */ + int max_probes; uint32_t max_samples; uint32_t max_samplerate; uint32_t protocol_version; @@ -100,7 +98,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;