]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
Add sr_ prefix for analog stuff some structs.
[libsigrok.git] / sigrok.h
index e2bbecc59a24281af38471a7ce5ec7701dc5570d..81709b3e6989536a78bd99780d4d56a53b2e7ee8 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -74,7 +74,7 @@ extern "C" {
 #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
 #endif
 
-typedef int (*receive_data_callback) (int fd, int revents, void *user_data);
+typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data);
 
 /* Data types used by hardware plugins for set_configuration() */
 enum {
@@ -88,7 +88,7 @@ enum {
 };
 
 /* (Unused) protocol decoder stack entry */
-struct protocol {
+struct sr_protocol {
        char *name;
        int id;
        int stackindex;
@@ -120,15 +120,15 @@ struct sr_datafeed_header {
        int num_logic_probes;
 };
 
-struct analog_probe {
+struct sr_analog_probe {
        uint8_t att;
        uint8_t res;    /* Needs to be a power of 2, FIXME */
        uint16_t val;   /* Max hardware ADC width is 16bits */
 };
 
-struct analog_sample {
+struct sr_analog_sample {
        uint8_t num_probes; /* Max hardware probes is 256 */
-       struct analog_probe probes[];
+       struct sr_analog_probe probes[];
 };
 
 struct sr_input {
@@ -163,7 +163,7 @@ struct sr_output_format {
                      uint64_t *length_out);
 };
 
-struct analyzer {
+struct sr_analyzer {
        char *name;
        char *filename;
        /*
@@ -345,7 +345,7 @@ struct sr_session {
        GSList *devices;
        /* List of struct analyzer* */
        GSList *analyzers;
-       /* list of receive_data_callback */
+       /* list of sr_receive_data_callback */
        GSList *datafeed_callbacks;
        GTimeVal starttime;
        gboolean running;