]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/ols.h
device: Change some functions to return int.
[libsigrok.git] / hardware / openbench-logic-sniffer / ols.h
index b9bbc67c6287775496de21b9263db42bde2de9a3..a954605e7f23d278a84a46a971244ba8095209f9 100644 (file)
@@ -17,7 +17,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef OLS_H_
 #define OLS_H_
 
@@ -60,7 +59,6 @@
 #define FLAG_CLOCK_INVERTED        0x80
 #define FLAG_RLE                   0x0100
 
-
 struct ols_device {
        uint32_t max_samplerate;
        uint32_t max_samples;
@@ -69,6 +67,7 @@ struct ols_device {
 
        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;
@@ -83,8 +82,9 @@ struct ols_device {
        int num_stages;
 
        unsigned int num_transfers;
+       unsigned int num_samples;
+       int rle_count;
        int num_bytes;
-       char last_sample[4];
        unsigned char sample[4];
        unsigned char tmp_sample[4];
        unsigned char *raw_sample_buf;