X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fdemo%2Fdemo.c;h=c318cb39acc7264e9cb7c36fdd50807307525740;hb=54ac5277c5e462f1778300b9bc3fdd4709ecb2dc;hp=281d9da4521f50f9c1ed114486703ac58281de0b;hpb=4bfbf9fce71f91b3e7b7e968d436f7c436fc9648;p=libsigrok.git diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 281d9da4..c318cb39 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -41,6 +41,7 @@ enum { GENMODE_INC, }; +/* FIXME: Should not be global. */ GIOChannel *channels[2]; struct databag { @@ -97,7 +98,7 @@ static int thread_running; static void hw_stop_acquisition(int device_index, gpointer session_device_id); -static int hw_init(char *deviceinfo) +static int hw_init(const char *deviceinfo) { struct sr_device_instance *sdi; @@ -362,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);