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

Function command_ctl_wr

libsigrok4DSL/hardware/DSL/command.c:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "../../log.h"
26
27SR_PRIV int command_ctl_wr(libusb_device_handle *devhdl, struct ctl_wr_cmd cmd)
28{
29 int ret;
30
31 assert(devhdl);
32
33 /* Send the control command. */
34 ret = libusb_control_transfer(devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
35 LIBUSB_ENDPOINT_OUT, CMD_CTL_WR, 0x0000, 0x0000,
36 (unsigned char *)&cmd, cmd.header.size+sizeof(struct ctl_header), 3000);
37 if (ret < 0) {
38 sr_err("Unable to send CMD_CTL_WR command(dest:%d/offset:%d/size:%d): %s.",
39 cmd.header.dest, cmd.header.offset, cmd.header.size,
40 libusb_error_name(ret));
41 return SR_ERR;
42 }
43
44 return SR_OK;
45}
46
47SR_PRIV int command_ctl_rd(libusb_device_handle *devhdl, struct ctl_rd_cmd cmd)
48{

Callers 11

dso_zeroFunction · 0.85
config_setFunction · 0.85
dev_acquisition_startFunction · 0.85
dsl_wr_regFunction · 0.85
dsl_wr_extFunction · 0.85
dsl_wr_dsoFunction · 0.85
dsl_wr_nvmFunction · 0.85
dsl_fpga_armFunction · 0.85
dsl_fpga_configFunction · 0.85
dsl_dev_acquisition_stopFunction · 0.85
dev_acquisition_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected