]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
Revise session API to allow for multiple sessions in future.
[libsigrok.git] / hardware / demo / demo.c
index 07ae253aa40f189e391029bc00ee70290ad379e0..ea5e0b53388dc1217f630ec559faa931ab0211ed 100644 (file)
@@ -50,7 +50,7 @@ enum {
        /**
         * Spells "sigrok" across 8 channels using '0's (with '1's as
         * "background") when displayed using the 'bits' output format.
-        * The pattern is repeasted every 8 channels, shifted to the right
+        * The pattern is repeated every 8 channels, shifted to the right
         * in time by one bit.
         */
        PATTERN_SIGROK,
@@ -59,7 +59,7 @@ enum {
        PATTERN_RANDOM,
 
        /**
-        * Incrementing number across 8 channels. The pattern is repeasted
+        * Incrementing number across 8 channels. The pattern is repeated
         * every 8 channels, shifted to the right in time by one bit.
         */
        PATTERN_INC,
@@ -726,7 +726,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        /* Make channels to unbuffered. */
        g_io_channel_set_buffered(devc->channel, FALSE);
 
-       sr_session_source_add_channel(devc->channel, G_IO_IN | G_IO_ERR,
+       sr_source_add_channel(devc->channel, G_IO_IN | G_IO_ERR,
                        40, prepare_data, (void *)sdi);
 
        /* Send header packet to the session bus. */
@@ -748,7 +748,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        devc = sdi->priv;
        sr_dbg("Stopping acquisition.");
 
-       sr_session_source_remove_channel(devc->channel);
+       sr_source_remove_channel(devc->channel);
        g_io_channel_shutdown(devc->channel, FALSE, NULL);
        g_io_channel_unref(devc->channel);
        devc->channel = NULL;