X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fteleinfo%2Fapi.c;h=71a14106fcf4f1b17c718a06ab041bc88c7aa5bf;hb=093b8ff47851f177c67db1e0490d183a7d716851;hp=eb9dd3e0698efd57dceb10355a0fde8c35e476ca;hpb=e66d1892d0dd16ed166fc8f13493f95de0607362;p=libsigrok.git diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c index eb9dd3e0..71a14106 100644 --- a/src/hardware/teleinfo/api.c +++ b/src/hardware/teleinfo/api.c @@ -29,8 +29,11 @@ static const uint32_t scanopts[] = { SR_CONF_SERIALCOMM, }; -static const uint32_t devopts[] = { +static const uint32_t drvopts[] = { SR_CONF_ENERGYMETER, +}; + +static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, SR_CONF_LIMIT_MSEC | SR_CONF_SET, @@ -121,8 +124,8 @@ scan_cleanup: return std_scan_complete(di, devices); } -static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *cg) +static int config_set(uint32_t key, GVariant *data, + const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; @@ -133,10 +136,10 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd return sr_sw_limits_config_set(&devc->sw_limits, key, data); } -static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *cg) +static int config_list(uint32_t key, GVariant **data, + const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, NULL, devopts); + return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts); } static int dev_acquisition_start(const struct sr_dev_inst *sdi) @@ -150,7 +153,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) std_session_send_df_header(sdi); - /* Poll every 50ms, or whenever some data comes in. */ serial_source_add(sdi->session, serial, G_IO_IN, 50, teleinfo_receive_data, (void *)sdi);