]> sigrok.org Git - libsigrok.git/commitdiff
Add sr_ prefix to session_{add,remove}.
authorUwe Hermann <redacted>
Sun, 20 Feb 2011 12:19:27 +0000 (13:19 +0100)
committerUwe Hermann <redacted>
Sun, 20 Feb 2011 20:16:22 +0000 (21:16 +0100)
hardware/alsa/alsa.c
hardware/asix-sigma/asix-sigma.c
hardware/demo/demo.c
hardware/link-mso19/link-mso19.c
hardware/openbench-logic-sniffer/ols.c
hardware/saleae-logic/saleae-logic.c
hwplugin.c
sigrok-proto.h

index 4dd542d5a4689f18d5730a5f88a2f4cc6a1152da..e4618cdfbb7abbd520d70e689feb42a070e3df5f 100644 (file)
@@ -331,7 +331,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        }
 
        alsa->session_id = session_device_id;
-       source_add(ufds[0].fd, ufds[0].events, 10, receive_data, sdi);
+       sr_source_add(ufds[0].fd, ufds[0].events, 10, receive_data, sdi);
 
        packet.type = SR_DF_HEADER;
        packet.length = sizeof(struct sr_datafeed_header);
index b19c06f36eebed1bddd540bfd6c8cbd243b145e5..ce67cc00fe36ad8ea784f908b7c723ad869e52fc 100644 (file)
@@ -1309,7 +1309,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        sr_session_bus(session_device_id, &packet);
 
        /* Add capture source. */
-       source_add(0, G_IO_IN, 10, receive_data, sdi);
+       sr_source_add(0, G_IO_IN, 10, receive_data, sdi);
 
        sigma->state.state = SIGMA_CAPTURE;
 
index 734b01da6bb86b61667bc972d7e150a1366666b8..6bacaf03b85e0c530e300082171b692c8cd53e74 100644 (file)
@@ -363,8 +363,8 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        g_io_channel_set_buffered(channels[0], FALSE);
        g_io_channel_set_buffered(channels[1], FALSE);
 
-       source_add(mydata->pipe_fds[0], G_IO_IN | G_IO_ERR, 40, receive_data,
-                  session_device_id);
+       sr_source_add(mydata->pipe_fds[0], G_IO_IN | G_IO_ERR, 40,
+                     receive_data, session_device_id);
 
        /* Run the demo thread. */
        g_thread_init(NULL);
index b3ad93041e2022c2f7040f5cca25b98cf571f113..bb72fd3ffefaac1dfbfa2b15ed6f320cd7abaa12 100644 (file)
@@ -721,7 +721,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
                return ret;
 
        mso->session_id = session_device_id;
-       source_add(sdi->serial->fd, G_IO_IN, -1, receive_data, sdi);
+       sr_source_add(sdi->serial->fd, G_IO_IN, -1, receive_data, sdi);
 
        packet.type = SR_DF_HEADER;
        packet.length = sizeof(struct sr_datafeed_header);
index ec5ce75ca7c0f6a0192f0116f3a3a04c810a9342..3c17e7e1201c112c80405ee3dbce29bd54b0de3d 100644 (file)
@@ -506,8 +506,8 @@ static int receive_data(int fd, int revents, void *user_data)
                 * longer than it takes to send a byte, that means it's
                 * finished. We'll double that to 30ms to be sure...
                 */
-               source_remove(fd);
-               source_add(fd, G_IO_IN, 30, receive_data, user_data);
+               sr_source_remove(fd);
+               sr_source_add(fd, G_IO_IN, 30, receive_data, user_data);
                raw_sample_buf = malloc(limit_samples * 4);
                /* fill with 1010... for debugging */
                memset(raw_sample_buf, 0x82, limit_samples * 4);
@@ -755,8 +755,8 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        if (send_shortcommand(sdi->serial->fd, CMD_RUN) != SR_OK)
                return SR_ERR;
 
-       source_add(sdi->serial->fd, G_IO_IN, -1, receive_data,
-                  session_device_id);
+       sr_source_add(sdi->serial->fd, G_IO_IN, -1, receive_data,
+                     session_device_id);
 
        /* Send header packet to the session bus. */
        packet = g_malloc(sizeof(struct sr_datafeed_packet));
index 4d3e718fbc65d260358d1bfe846e93d9dec11c19..81ef3e8c7a96188d3457e308e7afa60e22dcd2df 100644 (file)
@@ -704,8 +704,8 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
 
        lupfd = libusb_get_pollfds(usb_context);
        for (i = 0; lupfd[i]; i++)
-               source_add(lupfd[i]->fd, lupfd[i]->events, 40, receive_data,
-                          NULL);
+               sr_source_add(lupfd[i]->fd, lupfd[i]->events, 40, receive_data,
+                             NULL);
        free(lupfd);
 
        packet->type = SR_DF_HEADER;
index 78621c161873dcc38f63311975e6178c3013d64d..554dc5df2b05e549c089c35a848e70ac4c013116 100644 (file)
@@ -230,13 +230,13 @@ struct sr_hwcap_option *sr_find_hwcap_option(int hwcap)
 
 /* unnecessary level of indirection follows. */
 
-void source_remove(int fd)
+void sr_source_remove(int fd)
 {
        sr_session_source_remove(fd);
 }
 
-void source_add(int fd, int events, int timeout, receive_data_callback rcv_cb,
-               void *user_data)
+void sr_source_add(int fd, int events, int timeout,
+                  receive_data_callback rcv_cb, void *user_data)
 {
        sr_session_source_add(fd, events, timeout, rcv_cb, user_data);
 }
index 7b337d48cbe189900a4ca7ea06e2aca5102ead85..83b84adc6ddb1cf731189c6f184fa24504f23c14 100644 (file)
@@ -85,9 +85,9 @@ void sr_serial_device_instance_free(struct sr_serial_device_instance *serial);
 
 int sr_find_hwcap(int *capabilities, int hwcap);
 struct sr_hwcap_option *sr_find_hwcap_option(int hwcap);
-void source_remove(int fd);
-void source_add(int fd, int events, int timeout, receive_data_callback rcv_cb,
-               void *user_data);
+void sr_source_remove(int fd);
+void sr_source_add(int fd, int events, int timeout,
+                  receive_data_callback rcv_cb, void *user_data);
 
 /*--- session.c -------------------------------------------------------------*/