drivers: Use timer sources instead of polling stdin
This commit is contained in:
parent
027bf07796
commit
c650d3ecbf
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue