MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / dev_open

Function dev_open

libsigrok4DSL/hardware/DSL/dscope.c:1847–1878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1845}
1846
1847static int dev_open(struct sr_dev_inst *sdi)
1848{
1849 gboolean fpga_done;
1850 int ret;
1851 GSList *l;
1852 gboolean zeroed;
1853 struct DSL_context *devc = sdi->priv;
1854
1855 if ((ret = dsl_dev_open(di, sdi, &fpga_done)) == SR_OK) {
1856 // load zero informations
1857 for(l = sdi->channels; l; l = l->next) {
1858 struct sr_channel *probe = (struct sr_channel *)l->data;
1859 zeroed = dso_load_eep(sdi, probe, fpga_done);
1860 if (!zeroed)
1861 break;
1862 }
1863 if (!zeroed) {
1864 config_set(SR_CONF_ZERO, g_variant_new_boolean(TRUE), sdi, NULL, NULL);
1865 sr_info("Zero have not been setted!");
1866 }
1867 if (!fpga_done) {
1868 if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_HMCAD1511) {
1869 dsl_config_adc(sdi, adc_init_fix);
1870 dsl_config_adc(sdi, adc_clk_init_1g);
1871 dsl_config_adc(sdi, adc_power_down);
1872 }
1873 dso_init(sdi);
1874 }
1875 }
1876
1877 return ret;
1878}
1879
1880static int dev_close(struct sr_dev_inst *sdi)
1881{

Callers

nothing calls this directly

Calls 5

dsl_dev_openFunction · 0.85
dso_load_eepFunction · 0.85
dsl_config_adcFunction · 0.85
config_setFunction · 0.70
dso_initFunction · 0.70

Tested by

no test coverage detected