]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/ols.c
Add sr_ prefix to 'struct samplerates'.
[libsigrok.git] / hardware / openbench-logic-sniffer / ols.c
index ec9fa4ed6c5bacd52f6508aa3f5ef625c4bef95c..ec5ce75ca7c0f6a0192f0116f3a3a04c810a9342 100644 (file)
@@ -91,7 +91,7 @@ static int capabilities[] = {
        0,
 };
 
-static struct samplerates samplerates = {
+static struct sr_samplerates samplerates = {
        10,
        MHZ(200),
        1,
@@ -147,7 +147,7 @@ static int send_longcommand(int fd, uint8_t command, uint32_t data)
 
 static int configure_probes(GSList *probes)
 {
-       struct probe *probe;
+       struct sr_probe *probe;
        GSList *l;
        int probe_bit, stage, i;
        char *tc;
@@ -160,7 +160,7 @@ static int configure_probes(GSList *probes)
 
        num_stages = 0;
        for (l = probes; l; l = l->next) {
-               probe = (struct probe *)l->data;
+               probe = (struct sr_probe *)l->data;
                if (!probe->enabled)
                        continue;
 
@@ -618,24 +618,24 @@ static int receive_data(int fd, int revents, void *user_data)
                                packet.length = trigger_at * 4;
                                packet.unitsize = 4;
                                packet.payload = raw_sample_buf;
-                               session_bus(user_data, &packet);
+                               sr_session_bus(user_data, &packet);
                        }
 
                        packet.type = SR_DF_TRIGGER;
                        packet.length = 0;
-                       session_bus(user_data, &packet);
+                       sr_session_bus(user_data, &packet);
 
                        packet.type = SR_DF_LOGIC;
                        packet.length = (limit_samples * 4) - (trigger_at * 4);
                        packet.unitsize = 4;
                        packet.payload = raw_sample_buf + trigger_at * 4;
-                       session_bus(user_data, &packet);
+                       sr_session_bus(user_data, &packet);
                } else {
                        packet.type = SR_DF_LOGIC;
                        packet.length = limit_samples * 4;
                        packet.unitsize = 4;
                        packet.payload = raw_sample_buf;
-                       session_bus(user_data, &packet);
+                       sr_session_bus(user_data, &packet);
                }
                free(raw_sample_buf);
 
@@ -643,7 +643,7 @@ static int receive_data(int fd, int revents, void *user_data)
                serial_close(fd);
                packet.type = SR_DF_END;
                packet.length = 0;
-               session_bus(user_data, &packet);
+               sr_session_bus(user_data, &packet);
        }
 
        return TRUE;
@@ -772,7 +772,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        header->protocol_id = SR_PROTO_RAW;
        header->num_logic_probes = NUM_PROBES;
        header->num_analog_probes = 0;
-       session_bus(session_device_id, packet);
+       sr_session_bus(session_device_id, packet);
        g_free(header);
        g_free(packet);
 
@@ -788,7 +788,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id)
 
        packet.type = SR_DF_END;
        packet.length = 0;
-       session_bus(session_device_id, &packet);
+       sr_session_bus(session_device_id, &packet);
 }
 
 struct sr_device_plugin ols_plugin_info = {