2
0
forked from Ivasoft/DSView

Code refactoring 24

This commit is contained in:
dreamsourcelabTAI
2022-09-30 19:24:07 +08:00
parent ceab0fd772
commit 27b38dbeb8
12 changed files with 128 additions and 100 deletions

View File

@@ -310,8 +310,8 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
if (sdi->status == SR_ST_ACTIVE) {
/* Device is already in use. */
sr_info("Device is actived, can't to open, handle:%p", usb->usb_dev);
return SR_ERR;
sr_detail("The usb device is opened, handle:%p", usb->usb_dev);
return SR_OK;
}
if (sdi->status == SR_ST_INITIALIZING) {
@@ -319,7 +319,7 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
}
dev_handel = usb->usb_dev;
sr_info("Open device instance, handle: %p", dev_handel);
sr_info("Open usb device instance, handle: %p", dev_handel);
if (libusb_open(dev_handel, &usb->devhdl) != 0){
sr_err("Failed to open device: %s, handle:%p",

View File

@@ -1369,10 +1369,12 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
/* Stop Previous GPIF acquisition */
wr_cmd.header.dest = DSL_CTL_STOP;
wr_cmd.header.size = 0;
if ((ret = command_ctl_wr(usb->devhdl, wr_cmd)) != SR_OK) {
sr_err("%s: Stop DSLogic acquisition failed!", __func__);
return ret;
} else {
}
else {
sr_info("%s: Stop Previous DSLogic acquisition!", __func__);
}