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

Function dsl_dev_acquisition_stop

libsigrok4DSL/hardware/DSL/dsl.c:2003–2041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2001}
2002
2003SR_PRIV int dsl_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
2004{
2005 (void)cb_data;
2006
2007 struct DSL_context *devc;
2008 struct sr_usb_dev_inst *usb;
2009 int ret;
2010 struct ctl_wr_cmd wr_cmd;
2011
2012 devc = sdi->priv;
2013 usb = sdi->conn;
2014
2015 if (!devc->abort) {
2016 devc->abort = TRUE;
2017 dsl_wr_reg(sdi, CTR0_ADDR, bmFORCE_RDY);
2018 sr_info("Send command:\"bmFORCE_RDY\"");
2019 }
2020 else if (devc->status == DSL_FINISH) {
2021 /* Stop GPIF acquisition */
2022 wr_cmd.header.dest = DSL_CTL_STOP;
2023 wr_cmd.header.size = 0;
2024 if ((ret = command_ctl_wr(usb->devhdl, wr_cmd)) != SR_OK)
2025 sr_err("%s: Sent acquisition stop command failed!", __func__);
2026 else
2027 sr_info("%s: Sent acquisition stop command!", __func__);
2028
2029 /* check a real stop of FPGA status*/
2030
2031 uint8_t hw_status = 1;
2032 dsl_rd_reg(sdi, HW_STATUS_ADDR, &hw_status);
2033
2034 /* adc power down*/
2035 if (devc->profile->dev_caps.feature_caps & CAPS_FEATURE_HMCAD1511) {
2036 dsl_config_adc(sdi, adc_power_down);
2037 }
2038 }
2039
2040 return SR_OK;
2041}
2042
2043SR_PRIV int dsl_dev_status_get(const struct sr_dev_inst *sdi, struct sr_status *status, gboolean prg)
2044{

Callers 2

dev_acquisition_stopFunction · 0.85
dev_acquisition_stopFunction · 0.85

Calls 4

dsl_wr_regFunction · 0.85
command_ctl_wrFunction · 0.85
dsl_rd_regFunction · 0.85
dsl_config_adcFunction · 0.85

Tested by

no test coverage detected