]> sigrok.org Git - libsigrok.git/commitdiff
drivers: Use timer sources instead of polling stdin
authorDaniel Elstner <redacted>
Mon, 31 Aug 2015 17:08:37 +0000 (19:08 +0200)
committerDaniel Elstner <redacted>
Thu, 3 Sep 2015 17:37:09 +0000 (19:37 +0200)
src/hardware/asix-sigma/asix-sigma.c
src/hardware/brymen-bm86x/api.c
src/hardware/chronovu-la/api.c
src/hardware/ikalogic-scanaplus/api.c
src/hardware/pipistrello-ols/api.c
src/hardware/uni-t-dmm/api.c

index eaade4bf8077ea9081c619867c1092fdfffba575..c75fdffb961f0558c44722fcd0e43e11c961ec72 100644 (file)
@@ -1517,7 +1517,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        std_session_send_df_header(sdi, LOG_PREFIX);
 
        /* Add capture source. */
-       sr_session_source_add(sdi->session, 0, G_IO_IN, 10, receive_data, (void *)sdi);
+       sr_session_source_add(sdi->session, -1, 0, 10, receive_data, (void *)sdi);
 
        devc->state.state = SIGMA_CAPTURE;
 
index 92baed540c4a292a678b40647afe8798c40aaf3a..5edc8383b419d8990aeeb3598e80f34ef2483605 100644 (file)
@@ -264,7 +264,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
        /* Send header packet to the session bus. */
        std_session_send_df_header(sdi, LOG_PREFIX);
 
-       sr_session_source_add(sdi->session, 0, 0, 10,
+       sr_session_source_add(sdi->session, -1, 0, 10,
                        brymen_bm86x_receive_data, (void *)sdi);
 
        return SR_OK;
index c4cc2ab097e4a33b6d5ac110c7f0e3694911dc7c..d735e1e1729a910c5dc3c7bf55d69e702e49e68d 100644 (file)
@@ -504,7 +504,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        devc->trigger_found = 0;
 
        /* Hook up a dummy handler to receive data from the device. */
-       sr_session_source_add(sdi->session, -1, G_IO_IN, 0, receive_data, (void *)sdi);
+       sr_session_source_add(sdi->session, -1, 0, 0, receive_data, (void *)sdi);
 
        return SR_OK;
 }
index 456eb58cd6279520928ef858761a222f13bb2ae6..b0660d79f5c0fcd98b99e6852c8b800ba3b83c60 100644 (file)
@@ -382,7 +382,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        std_session_send_df_header(sdi, LOG_PREFIX);
 
        /* Hook up a dummy handler to receive data from the device. */
-       sr_session_source_add(sdi->session, -1, G_IO_IN, 0, scanaplus_receive_data, (void *)sdi);
+       sr_session_source_add(sdi->session, -1, 0, 0, scanaplus_receive_data, (void *)sdi);
 
        return SR_OK;
 }
index 3c7fc7b1790c0af6e1c37f33d929bb85523631f7..2c0313ba2bec718dd8cba953e33ecc7526362dc4 100644 (file)
@@ -693,7 +693,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
        /* Hook up a dummy handler to receive data from the device. */
-       sr_session_source_add(sdi->session, 0, G_IO_IN, 10, p_ols_receive_data,
+       sr_session_source_add(sdi->session, -1, 0, 10, p_ols_receive_data,
                        cb_data);
 
        return SR_OK;
index a21663fca5f1d3f0f5f7f71a0bd3b7f90ba3460d..199ad6b5a617bed5a3a2b78d85c5414aea2103c6 100644 (file)
@@ -201,7 +201,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        /* Send header packet to the session bus. */
        std_session_send_df_header(sdi, LOG_PREFIX);
 
-       sr_session_source_add(sdi->session, 0, 0, 10 /* poll_timeout */,
+       sr_session_source_add(sdi->session, -1, 0, 10 /* poll_timeout */,
                      uni_t_dmm_receive_data, (void *)sdi);
 
        return SR_OK;