forked from Ivasoft/DSView
Merge from the last commit of release-1.2.2 branch
This commit is contained in:
@@ -35,7 +35,6 @@ SR_PRIV int dsl_secuWrite(const struct sr_dev_inst *sdi, uint16_t cmd, uint16_t
|
||||
SR_PRIV gboolean dsl_isSecuReady(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV gboolean dsl_isSecuPass(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV uint16_t dsl_secuRead(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int dsl_secuCheck(const struct sr_dev_inst *sdi, uint16_t* encryption, int steps);
|
||||
|
||||
static const int32_t probeOptions[] = {
|
||||
SR_CONF_PROBE_COUPLING,
|
||||
|
||||
@@ -1356,4 +1356,6 @@ SR_PRIV int dsl_header_size(const struct DSL_context *devc);
|
||||
|
||||
SR_PRIV int dsl_destroy_device(const struct sr_dev_inst *sdi);
|
||||
|
||||
SR_PRIV int dsl_secuCheck(const struct sr_dev_inst *sdi, uint16_t* encryption, int steps);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1090,7 +1090,11 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
|
||||
}
|
||||
else if (id == SR_CONF_VTH) {
|
||||
devc->vth = g_variant_get_double(data);
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*255));
|
||||
|
||||
if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_MAX25_VTH)
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*(2.5/3.3)*255));
|
||||
else
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*255));
|
||||
}
|
||||
else if (id == SR_CONF_MAX_HEIGHT) {
|
||||
stropt = g_variant_get_string(data, NULL);
|
||||
@@ -1255,9 +1259,12 @@ static int dev_open(struct sr_dev_inst *sdi)
|
||||
|
||||
devc = sdi->priv;
|
||||
|
||||
if ((ret = dsl_dev_open(di, sdi, &fpga_done)) == SR_OK) {
|
||||
if ((ret = dsl_dev_open(di, sdi, &fpga_done)) == SR_OK) {
|
||||
if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_MAX25_VTH)
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*(2.5/3.3)*255));
|
||||
else
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*255));
|
||||
// set threshold
|
||||
ret = dsl_wr_reg(sdi, VTH_ADDR, (uint8_t)(devc->vth/5.0*255));
|
||||
if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_ADF4360) {
|
||||
dsl_config_adc(sdi, adc_clk_init_500m);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user