X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fopenbench-logic-sniffer%2Fols.h;h=179426858d0a011b34a069736aefb0c3873feadc;hb=6f22a8ef2ccf7091324b41b553632695507215a7;hp=a954605e7f23d278a84a46a971244ba8095209f9;hpb=3a4d09c0de68c3ae9f287d243967431b8e3de0b7;p=libsigrok.git diff --git a/hardware/openbench-logic-sniffer/ols.h b/hardware/openbench-logic-sniffer/ols.h index a954605e..17942685 100644 --- a/hardware/openbench-logic-sniffer/ols.h +++ b/hardware/openbench-logic-sniffer/ols.h @@ -1,7 +1,7 @@ /* * This file is part of the sigrok project. * - * Copyright (C) 2011 Bert Vermeulen + * Copyright (C) 2010-2012 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#ifndef OLS_H_ -#define OLS_H_ +#ifndef LIBSIGROK_HARDWARE_OPENBENCH_LOGIC_SNIFFER_OLS_H +#define LIBSIGROK_HARDWARE_OPENBENCH_LOGIC_SNIFFER_OLS_H #define NUM_PROBES 32 #define NUM_TRIGGER_STAGES 4 @@ -59,15 +59,14 @@ #define FLAG_CLOCK_INVERTED 0x80 #define FLAG_RLE 0x0100 -struct ols_device { +/* Private, per-device-instance driver context. */ +struct dev_context { uint32_t max_samplerate; uint32_t max_samples; uint32_t protocol_version; - int num_probes; uint64_t cur_samplerate; uint32_t cur_samplerate_divider; - uint64_t period_ps; uint64_t limit_samples; /* Current state of the flag register */ uint32_t flag_reg; @@ -88,6 +87,8 @@ struct ols_device { unsigned char sample[4]; unsigned char tmp_sample[4]; unsigned char *raw_sample_buf; + + struct sr_serial_dev_inst *serial; }; -#endif /* OLS_H_ */ +#endif