/* TODO: get handle from sdi->conn and open it. */
- sdi->status = SR_ST_ACTIVE;
-
return SR_OK;
}}
/* TODO: get handle from sdi->conn and close it. */
- sdi->status = SR_ST_INACTIVE;
-
return SR_OK;
}}
(void)data;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
switch (key) {{
/* TODO */
static int dev_acquisition_start(const struct sr_dev_inst *sdi)
{{
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
/* TODO: configure hardware, reset acquisition state, set up
* callbacks and send header packet. */
static int dev_acquisition_stop(struct sr_dev_inst *sdi)
{{
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
/* TODO: stop acquisition. */
return SR_OK;