]> sigrok.org Git - libsigrok.git/blobdiff - output/text/text.h
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / output / text / text.h
index 9d5abd530c509b1bdc70167909a3a8a255c849a9..a7414db39c8eb36069f08569f826ce4e1d6152cd 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
- * Copyright (C) 2011 Bert Vermeulen <bert@biot.com>
+ * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  *
  * 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
@@ -31,37 +31,40 @@ enum outputmode {
 };
 
 struct context {
-       unsigned int num_enabled_probes;
+       unsigned int num_enabled_channels;
        int samples_per_line;
        unsigned int unitsize;
        int line_offset;
        int linebuf_len;
-       char *probelist[65];
-       char *linebuf;
+       GSList *channelnames;
+       uint8_t *linebuf;
        int spl_cnt;
        uint8_t *linevalues;
        char *header;
        int mark_trigger;
-       uint64_t prevsample;
+       uint8_t *prevsample;
        enum outputmode mode;
 };
 
-void flush_linebufs(struct context *ctx, char *outbuf);
-int init(struct sr_output *o, int default_spl, enum outputmode mode);
-int event(struct sr_output *o, int event_type, char **data_out,
-                uint64_t *length_out);
+SR_PRIV void flush_linebufs(struct context *ctx, uint8_t *outbuf);
+SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode);
+SR_PRIV int text_cleanup(struct sr_output *o);
+SR_PRIV int event(struct sr_output *o, int event_type, uint8_t **data_out,
+                 uint64_t *length_out);
 
+SR_PRIV int init_bits(struct sr_output *o);
+SR_PRIV int data_bits(struct sr_output *o, const uint8_t *data_in,
+                     uint64_t length_in, uint8_t **data_out,
+                     uint64_t *length_out);
 
-int init_bits(struct sr_output *o);
-int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
-                    char **data_out, uint64_t *length_out);
+SR_PRIV int init_hex(struct sr_output *o);
+SR_PRIV int data_hex(struct sr_output *o, const uint8_t *data_in,
+                    uint64_t length_in, uint8_t **data_out,
+                    uint64_t *length_out);
 
-int init_hex(struct sr_output *o);
-int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
-                    char **data_out, uint64_t *length_out);
-
-int init_ascii(struct sr_output *o);
-int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
-                    char **data_out, uint64_t *length_out);
+SR_PRIV int init_ascii(struct sr_output *o);
+SR_PRIV int data_ascii(struct sr_output *o, const uint8_t *data_in,
+                      uint64_t length_in, uint8_t **data_out,
+                      uint64_t *length_out);
 
 #endif