dreamsourcelab-dslogic: Naming and other consistency fixes.
This commit is contained in:
parent
f74485b608
commit
44b46d7036
|
@ -272,11 +272,11 @@ src_libdrivers_la_SOURCES += \
|
||||||
src/hardware/demo/protocol.c \
|
src/hardware/demo/protocol.c \
|
||||||
src/hardware/demo/api.c
|
src/hardware/demo/api.c
|
||||||
endif
|
endif
|
||||||
if HW_DSLOGIC
|
if HW_DREAMSOURCELAB_DSLOGIC
|
||||||
src_libdrivers_la_SOURCES += \
|
src_libdrivers_la_SOURCES += \
|
||||||
src/hardware/dslogic/protocol.h \
|
src/hardware/dreamsourcelab-dslogic/protocol.h \
|
||||||
src/hardware/dslogic/protocol.c \
|
src/hardware/dreamsourcelab-dslogic/protocol.c \
|
||||||
src/hardware/dslogic/api.c
|
src/hardware/dreamsourcelab-dslogic/api.c
|
||||||
endif
|
endif
|
||||||
if HW_FLUKE_DMM
|
if HW_FLUKE_DMM
|
||||||
src_libdrivers_la_SOURCES += \
|
src_libdrivers_la_SOURCES += \
|
||||||
|
|
|
@ -234,7 +234,7 @@ SR_DRIVER([ChronoVu LA], [chronovu-la], [libusb libftdi])
|
||||||
SR_DRIVER([Colead SLM], [colead-slm], [libserialport])
|
SR_DRIVER([Colead SLM], [colead-slm], [libserialport])
|
||||||
SR_DRIVER([Conrad DIGI 35 CPU], [conrad-digi-35-cpu], [libserialport])
|
SR_DRIVER([Conrad DIGI 35 CPU], [conrad-digi-35-cpu], [libserialport])
|
||||||
SR_DRIVER([demo], [demo])
|
SR_DRIVER([demo], [demo])
|
||||||
SR_DRIVER([DreamSourceLabs], [DSLogic], [libusb])
|
SR_DRIVER([DreamSourceLab DSLogic], [dreamsourcelab-dslogic], [libusb])
|
||||||
SR_DRIVER([Fluke DMM], [fluke-dmm], [libserialport])
|
SR_DRIVER([Fluke DMM], [fluke-dmm], [libserialport])
|
||||||
SR_DRIVER([FTDI LA], [ftdi-la], [libusb libftdi])
|
SR_DRIVER([FTDI LA], [ftdi-la], [libusb libftdi])
|
||||||
SR_DRIVER([fx2lafw], [fx2lafw], [libusb])
|
SR_DRIVER([fx2lafw], [fx2lafw], [libusb])
|
||||||
|
|
|
@ -26,23 +26,23 @@ static const struct dslogic_profile supported_device[] = {
|
||||||
/* DreamSourceLab DSLogic */
|
/* DreamSourceLab DSLogic */
|
||||||
{ 0x2a0e, 0x0001, "DreamSourceLab", "DSLogic", NULL,
|
{ 0x2a0e, 0x0001, "DreamSourceLab", "DSLogic", NULL,
|
||||||
"dreamsourcelab-dslogic-fx2.fw",
|
"dreamsourcelab-dslogic-fx2.fw",
|
||||||
0, "DreamSourceLab", "DSLogic", 256 * 1048576ULL},
|
0, "DreamSourceLab", "DSLogic", 256 * 1024 * 1024},
|
||||||
/* DreamSourceLab DSCope */
|
/* DreamSourceLab DSCope */
|
||||||
{ 0x2a0e, 0x0002, "DreamSourceLab", "DSCope", NULL,
|
{ 0x2a0e, 0x0002, "DreamSourceLab", "DSCope", NULL,
|
||||||
"dreamsourcelab-dscope-fx2.fw",
|
"dreamsourcelab-dscope-fx2.fw",
|
||||||
0, "DreamSourceLab", "DSCope", 256 * 1048576ULL},
|
0, "DreamSourceLab", "DSCope", 256 * 1024 * 1024},
|
||||||
/* DreamSourceLab DSLogic Pro */
|
/* DreamSourceLab DSLogic Pro */
|
||||||
{ 0x2a0e, 0x0003, "DreamSourceLab", "DSLogic Pro", NULL,
|
{ 0x2a0e, 0x0003, "DreamSourceLab", "DSLogic Pro", NULL,
|
||||||
"dreamsourcelab-dslogic-pro-fx2.fw",
|
"dreamsourcelab-dslogic-pro-fx2.fw",
|
||||||
0, "DreamSourceLab", "DSLogic", 256 * 1048576ULL},
|
0, "DreamSourceLab", "DSLogic", 256 * 1024 * 1024},
|
||||||
/* DreamSourceLab DSLogic Plus */
|
/* DreamSourceLab DSLogic Plus */
|
||||||
{ 0x2a0e, 0x0020, "DreamSourceLab", "DSLogic Plus", NULL,
|
{ 0x2a0e, 0x0020, "DreamSourceLab", "DSLogic Plus", NULL,
|
||||||
"dreamsourcelab-dslogic-plus-fx2.fw",
|
"dreamsourcelab-dslogic-plus-fx2.fw",
|
||||||
0, "DreamSourceLab", "DSLogic", 256 * 1048576ULL},
|
0, "DreamSourceLab", "DSLogic", 256 * 1024 * 1024},
|
||||||
/* DreamSourceLab DSLogic Basic */
|
/* DreamSourceLab DSLogic Basic */
|
||||||
{ 0x2a0e, 0x0021, "DreamSourceLab", "DSLogic Basic", NULL,
|
{ 0x2a0e, 0x0021, "DreamSourceLab", "DSLogic Basic", NULL,
|
||||||
"dreamsourcelab-dslogic-basic-fx2.fw",
|
"dreamsourcelab-dslogic-basic-fx2.fw",
|
||||||
0, "DreamSourceLab", "DSLogic", 256 * 1024ULL},
|
0, "DreamSourceLab", "DSLogic", 256 * 1024},
|
||||||
|
|
||||||
ALL_ZERO
|
ALL_ZERO
|
||||||
};
|
};
|
||||||
|
@ -150,7 +150,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||||
else
|
else
|
||||||
conn_devices = NULL;
|
conn_devices = NULL;
|
||||||
|
|
||||||
/* Find all dslogic compatible devices and upload firmware to them. */
|
/* Find all DSLogic compatible devices and upload firmware to them. */
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist);
|
libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist);
|
||||||
for (i = 0; devlist[i]; i++) {
|
for (i = 0; devlist[i]; i++) {
|
||||||
|
@ -168,7 +168,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
libusb_get_device_descriptor( devlist[i], &des);
|
libusb_get_device_descriptor(devlist[i], &des);
|
||||||
|
|
||||||
if (!is_plausible(&des))
|
if (!is_plausible(&des))
|
||||||
continue;
|
continue;
|
||||||
|
@ -260,7 +260,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||||
|
|
||||||
if (has_firmware) {
|
if (has_firmware) {
|
||||||
/* Already has the firmware, so fix the new address. */
|
/* Already has the firmware, so fix the new address. */
|
||||||
sr_dbg("Found an dslogic device.");
|
sr_dbg("Found a DSLogic device.");
|
||||||
sdi->status = SR_ST_INACTIVE;
|
sdi->status = SR_ST_INACTIVE;
|
||||||
sdi->inst_type = SR_INST_USB;
|
sdi->inst_type = SR_INST_USB;
|
||||||
sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
|
sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
|
||||||
|
@ -387,7 +387,7 @@ static int dev_close(struct sr_dev_inst *sdi)
|
||||||
if (!usb->devhdl)
|
if (!usb->devhdl)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
||||||
sr_info("dslogic: Closing device on %d.%d (logical) / %s (physical) interface %d.",
|
sr_info("Closing device on %d.%d (logical) / %s (physical) interface %d.",
|
||||||
usb->bus, usb->address, sdi->connection_id, USB_INTERFACE);
|
usb->bus, usb->address, sdi->connection_id, USB_INTERFACE);
|
||||||
libusb_release_interface(usb->devhdl, USB_INTERFACE);
|
libusb_release_interface(usb->devhdl, USB_INTERFACE);
|
||||||
libusb_close(usb->devhdl);
|
libusb_close(usb->devhdl);
|
||||||
|
@ -638,9 +638,9 @@ static int config_list(uint32_t key, GVariant **data,
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sr_dev_driver dslogic_driver_info = {
|
static struct sr_dev_driver dreamsourcelab_dslogic_driver_info = {
|
||||||
.name = "dslogic",
|
.name = "dreamsourcelab-dslogic",
|
||||||
.longname = "DreamSourceLabs DSLogic",
|
.longname = "DreamSourceLab DSLogic",
|
||||||
.api_version = 1,
|
.api_version = 1,
|
||||||
.init = std_init,
|
.init = std_init,
|
||||||
.cleanup = std_cleanup,
|
.cleanup = std_cleanup,
|
||||||
|
@ -656,4 +656,4 @@ static struct sr_dev_driver dslogic_driver_info = {
|
||||||
.dev_acquisition_stop = dslogic_acquisition_stop,
|
.dev_acquisition_stop = dslogic_acquisition_stop,
|
||||||
.context = NULL,
|
.context = NULL,
|
||||||
};
|
};
|
||||||
SR_REGISTER_DEV_DRIVER(dslogic_driver_info);
|
SR_REGISTER_DEV_DRIVER(dreamsourcelab_dslogic_driver_info);
|
|
@ -76,15 +76,15 @@
|
||||||
* number of 16-bit words.
|
* number of 16-bit words.
|
||||||
*/
|
*/
|
||||||
#define _DS_CFG(variable, wordcnt) ((variable << 8) | wordcnt)
|
#define _DS_CFG(variable, wordcnt) ((variable << 8) | wordcnt)
|
||||||
#define DS_CFG_START 0xf5a5f5a5
|
#define DS_CFG_START 0xf5a5f5a5
|
||||||
#define DS_CFG_MODE _DS_CFG(0, 1)
|
#define DS_CFG_MODE _DS_CFG(0, 1)
|
||||||
#define DS_CFG_DIVIDER _DS_CFG(1, 2)
|
#define DS_CFG_DIVIDER _DS_CFG(1, 2)
|
||||||
#define DS_CFG_COUNT _DS_CFG(3, 2)
|
#define DS_CFG_COUNT _DS_CFG(3, 2)
|
||||||
#define DS_CFG_TRIG_POS _DS_CFG(5, 2)
|
#define DS_CFG_TRIG_POS _DS_CFG(5, 2)
|
||||||
#define DS_CFG_TRIG_GLB _DS_CFG(7, 1)
|
#define DS_CFG_TRIG_GLB _DS_CFG(7, 1)
|
||||||
#define DS_CFG_CH_EN _DS_CFG(8, 1)
|
#define DS_CFG_CH_EN _DS_CFG(8, 1)
|
||||||
#define DS_CFG_TRIG _DS_CFG(64, 160)
|
#define DS_CFG_TRIG _DS_CFG(64, 160)
|
||||||
#define DS_CFG_END 0xfa5afa5a
|
#define DS_CFG_END 0xfa5afa5a
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
@ -437,8 +437,6 @@ static void set_trigger(const struct sr_dev_inst *sdi,
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->trig_glb |= num_trigger_stages;
|
cfg->trig_glb |= num_trigger_stages;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fpga_configure(const struct sr_dev_inst *sdi)
|
static int fpga_configure(const struct sr_dev_inst *sdi)
|
|
@ -18,8 +18,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBSIGROK_HARDWARE_DSLOGIC_PROTOCOL_H
|
#ifndef LIBSIGROK_HARDWARE_DREAMSOURCELAB_DSLOGIC_PROTOCOL_H
|
||||||
#define LIBSIGROK_HARDWARE_DSLOGIC_PROTOCOL_H
|
#define LIBSIGROK_HARDWARE_DREAMSOURCELAB_DSLOGIC_PROTOCOL_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -105,7 +105,7 @@ struct dslogic_profile {
|
||||||
struct dev_context {
|
struct dev_context {
|
||||||
const struct dslogic_profile *profile;
|
const struct dslogic_profile *profile;
|
||||||
/*
|
/*
|
||||||
* Since we can't keep track of an dslogic device after upgrading
|
* Since we can't keep track of a DSLogic device after upgrading
|
||||||
* the firmware (it renumerates into a different device address
|
* the firmware (it renumerates into a different device address
|
||||||
* after the upgrade) this is like a global lock. No device will open
|
* after the upgrade) this is like a global lock. No device will open
|
||||||
* until a proper delay after the last device was upgraded.
|
* until a proper delay after the last device was upgraded.
|
Loading…
Reference in New Issue