X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fprotocol.h;h=2506c4a95d4bbab2f9aafd832acbebde1d5b1a43;hb=838f01227382bfd8e5b9c817e7fefff93d2c7b28;hp=6b8c2422b72a90ff584ac3957ecbf15a59db0b1c;hpb=f8fd84208d5cb2788ef0288ddb87da3581467a96;p=libsigrok.git diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index 6b8c2422..2506c4a9 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.h +++ b/src/hardware/openbench-logic-sniffer/protocol.h @@ -28,10 +28,10 @@ #define LOG_PREFIX "openbench-logic-sniffer" -#define NUM_BASIC_TRIGGER_STAGES 4 -#define CLOCK_RATE SR_MHZ(100) -#define MIN_NUM_SAMPLES 4 -#define DEFAULT_SAMPLERATE SR_KHZ(200) +#define NUM_BASIC_TRIGGER_STAGES 4 +#define CLOCK_RATE SR_MHZ(100) +#define MIN_NUM_SAMPLES 4 +#define DEFAULT_SAMPLERATE SR_KHZ(200) /* Command opcodes */ #define CMD_RESET 0x00 @@ -123,23 +123,21 @@ struct dev_context { unsigned int rle_count; unsigned char sample[4]; - unsigned char tmp_sample[4]; unsigned char *raw_sample_buf; }; SR_PRIV extern const char *ols_channel_names[]; SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial, - uint8_t command); -SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial, - uint8_t command, uint8_t *data); + uint8_t command); +SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial, uint8_t command, + uint8_t *data); SR_PRIV int ols_send_reset(struct sr_serial_dev_inst *serial); SR_PRIV int ols_prepare_acquisition(const struct sr_dev_inst *sdi); SR_PRIV uint32_t ols_channel_mask(const struct sr_dev_inst *sdi); -SR_PRIV struct dev_context *ols_dev_new(void); -SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial); +SR_PRIV int ols_get_metadata(struct sr_dev_inst *sdi); SR_PRIV int ols_set_samplerate(const struct sr_dev_inst *sdi, - uint64_t samplerate); + uint64_t samplerate); SR_PRIV void abort_acquisition(const struct sr_dev_inst *sdi); SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data);