std: Rename std_dev_clear() to std_dev_clear_with_callback().
This commit is contained in:
parent
4d67b9d9dc
commit
6e43c3d531
|
@ -551,7 +551,7 @@ SR_API int sr_dev_clear(const struct sr_dev_driver *driver)
|
|||
if (driver->dev_clear)
|
||||
ret = driver->dev_clear(driver);
|
||||
else
|
||||
ret = std_dev_clear(driver, NULL);
|
||||
ret = std_dev_clear_with_callback(driver, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ static const int32_t trigger_matches[] = {
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, sigma_clear_helper);
|
||||
return std_dev_clear_with_callback(di, sigma_clear_helper);
|
||||
}
|
||||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
|
|
|
@ -55,7 +55,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int add_device(int model, struct libusb_device_descriptor *des,
|
||||
|
|
|
@ -198,7 +198,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -293,7 +293,7 @@ static void clear_dev_context(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, clear_dev_context);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -251,7 +251,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -356,7 +356,7 @@ static void clear_dev_context(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, clear_dev_context);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -126,7 +126,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -167,7 +167,7 @@ static void clear_dev_context(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, clear_dev_context);
|
||||
}
|
||||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
|
|
|
@ -244,7 +244,7 @@ static void clear_dev_context(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, clear_dev_context);
|
||||
}
|
||||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
|
|
|
@ -238,7 +238,7 @@ static int dev_clear(const struct sr_dev_driver *di)
|
|||
}
|
||||
}
|
||||
|
||||
return std_dev_clear(di, clear_private);
|
||||
return std_dev_clear_with_callback(di, clear_private);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -167,7 +167,7 @@ static void clear_dev_context(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, &clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, &clear_dev_context);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -57,7 +57,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
|
|
|
@ -130,7 +130,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -507,7 +507,7 @@ static void dev_clear_private(struct dev_context *devc)
|
|||
|
||||
static int dev_clear_lps301(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, (std_dev_clear_callback)dev_clear_private);
|
||||
return std_dev_clear_with_callback(di, (std_dev_clear_callback)dev_clear_private);
|
||||
}
|
||||
|
||||
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -105,7 +105,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, NULL);
|
||||
return std_dev_clear_with_callback(di, NULL);
|
||||
}
|
||||
|
||||
static int config_get(uint32_t key, GVariant **data,
|
||||
|
|
|
@ -201,7 +201,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -293,7 +293,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
|
||||
|
|
|
@ -157,7 +157,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, NULL);
|
||||
return std_dev_clear_with_callback(di, NULL);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -182,7 +182,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, NULL);
|
||||
return std_dev_clear_with_callback(di, NULL);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -300,7 +300,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -35,7 +35,7 @@ struct lcr_es51919_info {
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, es51919_serial_clean);
|
||||
return std_dev_clear_with_callback(di, es51919_serial_clean);
|
||||
}
|
||||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
|
|
|
@ -224,7 +224,7 @@ static void clear_dev_context(void *priv)
|
|||
*/
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, &clear_dev_context);
|
||||
return std_dev_clear_with_callback(di, &clear_dev_context);
|
||||
}
|
||||
|
||||
/* Drain any pending data from the USB transfer buffers on the device.
|
||||
|
|
|
@ -136,7 +136,7 @@ static void clear_helper(void *priv)
|
|||
|
||||
static int dev_clear(const struct sr_dev_driver *di)
|
||||
{
|
||||
return std_dev_clear(di, clear_helper);
|
||||
return std_dev_clear_with_callback(di, clear_helper);
|
||||
}
|
||||
|
||||
static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
|
|
@ -940,7 +940,7 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi);
|
|||
#endif
|
||||
SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int std_session_send_df_end(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||
SR_PRIV int std_dev_clear_with_callback(const struct sr_dev_driver *driver,
|
||||
std_dev_clear_callback clear_private);
|
||||
SR_PRIV GSList *std_dev_list(const struct sr_dev_driver *di);
|
||||
SR_PRIV int std_serial_dev_close(struct sr_dev_inst *sdi);
|
||||
|
|
|
@ -349,7 +349,7 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi)
|
|||
* @retval SR_ERR_BUG Implementation bug.
|
||||
* @retval other Other error.
|
||||
*/
|
||||
SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||
SR_PRIV int std_dev_clear_with_callback(const struct sr_dev_driver *driver,
|
||||
std_dev_clear_callback clear_private)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
|
|
Loading…
Reference in New Issue