diff --git a/DSView/pv/device/devinst.cpp b/DSView/pv/device/devinst.cpp index 1a023c05..731df1fc 100644 --- a/DSView/pv/device/devinst.cpp +++ b/DSView/pv/device/devinst.cpp @@ -180,7 +180,7 @@ GSList* DevInst::get_dev_mode_list() assert(_owner); sr_dev_inst *const sdi = dev_inst(); assert(sdi); - return sr_dev_mode_list(sdi->driver); + return sr_dev_mode_list(sdi); } bool DevInst::is_trigger_enabled() const diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index 6b0c1de5..6840c2d4 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -317,7 +317,10 @@ void MainWindow::update_device_list() if (strcmp(selected_device->dev_inst()->driver->name, "demo") != 0) { _logo_bar->dsl_connected(true); - QString ses_name = config_path + QString::fromLocal8Bit(selected_device->dev_inst()->driver->name) + "_ini.dsc"; + QString ses_name = config_path + + QString::fromLocal8Bit(selected_device->dev_inst()->driver->name) + + QString::number(selected_device->dev_inst()->mode) + + ".dsc"; load_session(ses_name); } else { _logo_bar->dsl_connected(false); @@ -486,6 +489,19 @@ void MainWindow::capture_state_changed(int state) } } +void MainWindow::closeEvent(QCloseEvent *event) +{ + QDir dir(QCoreApplication::applicationDirPath()); + if (dir.cd("res")) { + QString driver_name = _session.get_device()->dev_inst()->driver->name; + QString mode_name = QString::number(_session.get_device()->dev_inst()->mode); + QString file_name = dir.absolutePath() + "/" + driver_name + mode_name + ".dsc"; + if (!file_name.isEmpty()) + store_session(file_name); + } + event->accept(); +} + void MainWindow::on_protocol(bool visible) { #ifdef ENABLE_DECODE diff --git a/DSView/pv/mainwindow.h b/DSView/pv/mainwindow.h index 49f845fb..4fd0b7c5 100644 --- a/DSView/pv/mainwindow.h +++ b/DSView/pv/mainwindow.h @@ -72,6 +72,9 @@ public: const char *open_file_name = NULL, QWidget *parent = 0); +protected: + void closeEvent(QCloseEvent *event); + private: void setup_ui(); diff --git a/DSView/pv/sigsession.cpp b/DSView/pv/sigsession.cpp index acc4e427..03d7e67b 100644 --- a/DSView/pv/sigsession.cpp +++ b/DSView/pv/sigsession.cpp @@ -102,7 +102,7 @@ SigSession::SigSession(DeviceManager &device_manager) : _refresh_timer.setSingleShot(true); _data_lock = false; connect(this, SIGNAL(start_timer(int)), &_view_timer, SLOT(start(int))); - connect(&_view_timer, SIGNAL(timeout()), this, SLOT(refresh())); + //connect(&_view_timer, SIGNAL(timeout()), this, SLOT(refresh())); connect(&_refresh_timer, SIGNAL(timeout()), this, SLOT(data_unlock())); } diff --git a/DSView/pv/toolbars/filebar.cpp b/DSView/pv/toolbars/filebar.cpp index cc192b5d..5916d0ce 100644 --- a/DSView/pv/toolbars/filebar.cpp +++ b/DSView/pv/toolbars/filebar.cpp @@ -48,29 +48,42 @@ FileBar::FileBar(SigSession &session, QWidget *parent) : _action_load = new QAction(this); _action_load->setText(QApplication::translate( - "File", "&Load Session...", 0)); + "File", "&Load...", 0)); _action_load->setIcon(QIcon::fromTheme("file", QIcon(":/icons/open.png"))); _action_load->setObjectName(QString::fromUtf8("actionLoad")); - _file_button.addAction(_action_load); connect(_action_load, SIGNAL(triggered()), this, SLOT(on_actionLoad_triggered())); _action_store = new QAction(this); _action_store->setText(QApplication::translate( - "File", "S&tore Session...", 0)); + "File", "S&tore...", 0)); _action_store->setIcon(QIcon::fromTheme("file", QIcon(":/icons/save.png"))); _action_store->setObjectName(QString::fromUtf8("actionStore")); - _file_button.addAction(_action_store); connect(_action_store, SIGNAL(triggered()), this, SLOT(on_actionStore_triggered())); + _action_default = new QAction(this); + _action_default->setText(QApplication::translate( + "File", "&Default...", 0)); + _action_default->setIcon(QIcon::fromTheme("file", + QIcon(":/icons/gear.png"))); + _action_default->setObjectName(QString::fromUtf8("actionDefault")); + connect(_action_default, SIGNAL(triggered()), this, SLOT(on_actionDefault_triggered())); + + _menu_session = new QMenu(tr("Session"), parent); + _menu_session->setIcon(QIcon::fromTheme("file", + QIcon(":/icons/gear.png"))); + _menu_session->setObjectName(QString::fromUtf8("menuSession")); + _menu_session->addAction(_action_load); + _menu_session->addAction(_action_store); + _menu_session->addAction(_action_default); + _action_open = new QAction(this); _action_open->setText(QApplication::translate( "File", "&Open...", 0)); _action_open->setIcon(QIcon::fromTheme("file", QIcon(":/icons/open.png"))); _action_open->setObjectName(QString::fromUtf8("actionOpen")); - _file_button.addAction(_action_open); connect(_action_open, SIGNAL(triggered()), this, SLOT(on_actionOpen_triggered())); _action_save = new QAction(this); @@ -79,14 +92,12 @@ FileBar::FileBar(SigSession &session, QWidget *parent) : _action_save->setIcon(QIcon::fromTheme("file", QIcon(":/icons/save.png"))); _action_save->setObjectName(QString::fromUtf8("actionSave")); - _file_button.addAction(_action_save); connect(_action_save, SIGNAL(triggered()), this, SLOT(on_actionSave_triggered())); _action_export = new QAction(this); _action_export->setText(QApplication::translate("File", "&Export...", 0)); _action_export->setIcon(QIcon::fromTheme("file",QIcon(":/icons/instant.png"))); _action_export->setObjectName(QString::fromUtf8("actionExport")); - _file_button.addAction(_action_export); connect(_action_export, SIGNAL(triggered()), this, SLOT(on_actionExport_triggered())); @@ -96,7 +107,6 @@ FileBar::FileBar(SigSession &session, QWidget *parent) : _action_capture->setIcon(QIcon::fromTheme("file", QIcon(":/icons/capture.png"))); _action_capture->setObjectName(QString::fromUtf8("actionCapture")); - _file_button.addAction(_action_capture); connect(_action_capture, SIGNAL(triggered()), this, SLOT(on_actionCapture_triggered())); _file_button.setPopupMode(QToolButton::InstantPopup); @@ -106,6 +116,13 @@ FileBar::FileBar(SigSession &session, QWidget *parent) : _file_button.setIcon(QIcon(":/icons/file.png")); #endif + _menu = new QMenu(this); + _menu->addMenu(_menu_session); + _menu->addAction(_action_open); + _menu->addAction(_action_save); + _menu->addAction(_action_export); + _menu->addAction(_action_capture); + _file_button.setMenu(_menu); addWidget(&_file_button); } @@ -214,6 +231,26 @@ void FileBar::on_actionLoad_triggered() load_session(file_name); } +void FileBar::on_actionDefault_triggered() +{ + QDir dir(QCoreApplication::applicationDirPath()); + if (!dir.cd("res")) { + QMessageBox msg(this); + msg.setText(tr("Session Load")); + msg.setInformativeText(tr("Cannot find default session file for this device!")); + msg.setStandardButtons(QMessageBox::Ok); + msg.setIcon(QMessageBox::Warning); + msg.exec(); + return; + } + + QString driver_name = _session.get_device()->dev_inst()->driver->name; + QString mode_name = QString::number(_session.get_device()->dev_inst()->mode); + QString file_name = dir.absolutePath() + "/" + driver_name + mode_name + ".def.dsc"; + if (!file_name.isEmpty()) + load_session(file_name); +} + void FileBar::on_actionStore_triggered() { QString default_name = _session.get_device()->dev_inst()->driver->name; diff --git a/DSView/pv/toolbars/filebar.h b/DSView/pv/toolbars/filebar.h index 93f82b33..6f4c2c40 100644 --- a/DSView/pv/toolbars/filebar.h +++ b/DSView/pv/toolbars/filebar.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "../sigsession.h" @@ -59,6 +60,7 @@ signals: private slots: void on_actionLoad_triggered(); void on_actionStore_triggered(); + void on_actionDefault_triggered(); void on_actionOpen_triggered(); void on_actionSave_triggered(); void on_actionCapture_triggered(); @@ -70,8 +72,13 @@ private: QToolButton _file_button; + QMenu *_menu; + + QMenu *_menu_session; QAction *_action_load; QAction *_action_store; + QAction *_action_default; + QAction *_action_open; QAction *_action_save; QAction *_action_export; diff --git a/DSView/res/DSCope.bin b/DSView/res/DSCope.bin index 8fd12058..6b7e2124 100644 Binary files a/DSView/res/DSCope.bin and b/DSView/res/DSCope.bin differ diff --git a/DSView/res/DSCope_ini.dsc b/DSView/res/DSCope1.def.dsc similarity index 96% rename from DSView/res/DSCope_ini.dsc rename to DSView/res/DSCope1.def.dsc index c65ab662..12412f65 100644 --- a/DSView/res/DSCope_ini.dsc +++ b/DSView/res/DSCope1.def.dsc @@ -6,6 +6,7 @@ "Sample count": "1048576", "Sample rate": "100000000", "Time base": "10000", + "Trigger hold off": "0", "Trigger slope": "0", "Trigger source": "0", "channel": [ diff --git a/DSView/res/DSCope_ini.dsc.bak b/DSView/res/DSCope1.dsc similarity index 88% rename from DSView/res/DSCope_ini.dsc.bak rename to DSView/res/DSCope1.dsc index c65ab662..ffe9d0c3 100644 --- a/DSView/res/DSCope_ini.dsc.bak +++ b/DSView/res/DSCope1.dsc @@ -4,14 +4,15 @@ "Horizontal trigger position": "0", "Operation Mode": "Normal", "Sample count": "1048576", - "Sample rate": "100000000", - "Time base": "10000", + "Sample rate": "50000", + "Time base": "2000000000", + "Trigger hold off": "0", "Trigger slope": "0", "Trigger source": "0", "channel": [ { "colour": "#eeb211", - "coupling": 0, + "coupling": 1, "enabled": true, "index": 0, "name": "0", diff --git a/DSView/res/DSLogic_ini.dsc b/DSView/res/DSLogic0.def.dsc similarity index 99% rename from DSView/res/DSLogic_ini.dsc rename to DSView/res/DSLogic0.def.dsc index 122db75b..780b982f 100644 --- a/DSView/res/DSLogic_ini.dsc +++ b/DSView/res/DSLogic0.def.dsc @@ -7,6 +7,7 @@ "Sample count": "16777216", "Sample rate": "100000000", "Threshold Level": 1, + "Trigger hold off": "0", "Trigger slope": "0", "Trigger source": "0", "Using Clock Negedge": 0, diff --git a/DSView/res/DSLogic_ini.dsc.bak b/DSView/res/DSLogic0.dsc similarity index 67% rename from DSView/res/DSLogic_ini.dsc.bak rename to DSView/res/DSLogic0.dsc index 122db75b..2c0371d3 100644 --- a/DSView/res/DSLogic_ini.dsc.bak +++ b/DSView/res/DSLogic0.dsc @@ -6,52 +6,13 @@ "Operation Mode": "Normal", "Sample count": "16777216", "Sample rate": "100000000", - "Threshold Level": 1, + "Threshold Level": "1.8/2.5/3.3V Level", + "Trigger hold off": "0", "Trigger slope": "0", "Trigger source": "0", "Using Clock Negedge": 0, "Using External Clock": 0, "channel": [ - { - "colour": "#16191a", - "enabled": true, - "index": 0, - "name": "0", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#8f5202", - "enabled": true, - "index": 1, - "name": "1", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#cc0000", - "enabled": true, - "index": 2, - "name": "2", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#f57900", - "enabled": true, - "index": 3, - "name": "3", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#edd400", - "enabled": true, - "index": 4, - "name": "4", - "strigger": 0, - "type": 10000 - }, { "colour": "#73d216", "enabled": true, @@ -60,62 +21,6 @@ "strigger": 0, "type": 10000 }, - { - "colour": "#3465a4", - "enabled": true, - "index": 6, - "name": "6", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#75507b", - "enabled": true, - "index": 7, - "name": "7", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#16191a", - "enabled": true, - "index": 8, - "name": "8", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#8f5202", - "enabled": true, - "index": 9, - "name": "9", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#cc0000", - "enabled": true, - "index": 10, - "name": "10", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#f57900", - "enabled": true, - "index": 11, - "name": "11", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#edd400", - "enabled": true, - "index": 12, - "name": "12", - "strigger": 0, - "type": 10000 - }, { "colour": "#73d216", "enabled": true, @@ -123,22 +28,6 @@ "name": "13", "strigger": 0, "type": 10000 - }, - { - "colour": "#3465a4", - "enabled": true, - "index": 14, - "name": "14", - "strigger": 0, - "type": 10000 - }, - { - "colour": "#75507b", - "enabled": true, - "index": 15, - "name": "15", - "strigger": 0, - "type": 10000 } ], "trigger": { diff --git a/DSView/res/DSLogic1.def.dsc b/DSView/res/DSLogic1.def.dsc new file mode 100644 index 00000000..06a4a02f --- /dev/null +++ b/DSView/res/DSLogic1.def.dsc @@ -0,0 +1,43 @@ +{ + "Device": "DSLogic", + "DeviceMode": 1, + "Filter Targets": "None", + "Horizontal trigger position": "0", + "Operation Mode": "Normal", + "Sample count": "1048576", + "Sample rate": "100000000", + "Threshold Level": "1.8/2.5/3.3V Level", + "Trigger hold off": "0", + "Trigger slope": "0", + "Trigger source": "0", + "Using Clock Negedge": 0, + "Using External Clock": 0, + "channel": [ + { + "colour": "#eeb211", + "coupling": 0, + "enabled": true, + "index": 0, + "name": "0", + "strigger": 0, + "trigValue": 0.5, + "type": 10001, + "vdiv": 1000, + "vfactor": 1, + "zeroPos": 0.5 + }, + { + "colour": "#009925", + "coupling": 0, + "enabled": true, + "index": 1, + "name": "1", + "strigger": 0, + "trigValue": 0.5, + "type": 10001, + "vdiv": 1000, + "vfactor": 1, + "zeroPos": 0.5 + } + ] +} diff --git a/DSView/res/DSLogic1.dsc b/DSView/res/DSLogic1.dsc new file mode 100644 index 00000000..06a4a02f --- /dev/null +++ b/DSView/res/DSLogic1.dsc @@ -0,0 +1,43 @@ +{ + "Device": "DSLogic", + "DeviceMode": 1, + "Filter Targets": "None", + "Horizontal trigger position": "0", + "Operation Mode": "Normal", + "Sample count": "1048576", + "Sample rate": "100000000", + "Threshold Level": "1.8/2.5/3.3V Level", + "Trigger hold off": "0", + "Trigger slope": "0", + "Trigger source": "0", + "Using Clock Negedge": 0, + "Using External Clock": 0, + "channel": [ + { + "colour": "#eeb211", + "coupling": 0, + "enabled": true, + "index": 0, + "name": "0", + "strigger": 0, + "trigValue": 0.5, + "type": 10001, + "vdiv": 1000, + "vfactor": 1, + "zeroPos": 0.5 + }, + { + "colour": "#009925", + "coupling": 0, + "enabled": true, + "index": 1, + "name": "1", + "strigger": 0, + "trigValue": 0.5, + "type": 10001, + "vdiv": 1000, + "vfactor": 1, + "zeroPos": 0.5 + } + ] +} diff --git a/DSView/res/DSLogic2.def.dsc b/DSView/res/DSLogic2.def.dsc new file mode 100644 index 00000000..7858fcad --- /dev/null +++ b/DSView/res/DSLogic2.def.dsc @@ -0,0 +1,89 @@ +{ + "Device": "DSLogic", + "DeviceMode": 2, + "Filter Targets": "None", + "Horizontal trigger position": "0", + "Operation Mode": "Normal", + "Sample count": "16777216", + "Sample rate": "100000000", + "Threshold Level": "1.8/2.5/3.3V Level", + "Trigger hold off": "0", + "Trigger slope": "0", + "Trigger source": "0", + "Using Clock Negedge": 0, + "Using External Clock": 0, + "channel": [ + { + "colour": "#1185d1", + "enabled": true, + "index": 0, + "name": "0", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#eeb211", + "enabled": true, + "index": 1, + "name": "1", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#d50f25", + "enabled": true, + "index": 2, + "name": "2", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#009925", + "enabled": true, + "index": 3, + "name": "3", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#1185d1", + "enabled": true, + "index": 4, + "name": "4", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#eeb211", + "enabled": true, + "index": 5, + "name": "5", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#d50f25", + "enabled": true, + "index": 6, + "name": "6", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#009925", + "enabled": true, + "index": 7, + "name": "7", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#1185d1", + "enabled": true, + "index": 8, + "name": "8", + "strigger": 0, + "type": 10002 + } + ] +} diff --git a/DSView/res/DSLogic2.dsc b/DSView/res/DSLogic2.dsc new file mode 100644 index 00000000..7858fcad --- /dev/null +++ b/DSView/res/DSLogic2.dsc @@ -0,0 +1,89 @@ +{ + "Device": "DSLogic", + "DeviceMode": 2, + "Filter Targets": "None", + "Horizontal trigger position": "0", + "Operation Mode": "Normal", + "Sample count": "16777216", + "Sample rate": "100000000", + "Threshold Level": "1.8/2.5/3.3V Level", + "Trigger hold off": "0", + "Trigger slope": "0", + "Trigger source": "0", + "Using Clock Negedge": 0, + "Using External Clock": 0, + "channel": [ + { + "colour": "#1185d1", + "enabled": true, + "index": 0, + "name": "0", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#eeb211", + "enabled": true, + "index": 1, + "name": "1", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#d50f25", + "enabled": true, + "index": 2, + "name": "2", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#009925", + "enabled": true, + "index": 3, + "name": "3", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#1185d1", + "enabled": true, + "index": 4, + "name": "4", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#eeb211", + "enabled": true, + "index": 5, + "name": "5", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#d50f25", + "enabled": true, + "index": 6, + "name": "6", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#009925", + "enabled": true, + "index": 7, + "name": "7", + "strigger": 0, + "type": 10002 + }, + { + "colour": "#1185d1", + "enabled": true, + "index": 8, + "name": "8", + "strigger": 0, + "type": 10002 + } + ] +} diff --git a/DSView/res/DSLogic33.bin b/DSView/res/DSLogic33.bin index c18d15ac..61d0846d 100644 Binary files a/DSView/res/DSLogic33.bin and b/DSView/res/DSLogic33.bin differ diff --git a/DSView/res/DSLogic50.bin b/DSView/res/DSLogic50.bin index 12ab55e3..cb68b89c 100644 Binary files a/DSView/res/DSLogic50.bin and b/DSView/res/DSLogic50.bin differ diff --git a/DSView/res/DSLogicPro.bin b/DSView/res/DSLogicPro.bin index b73066fa..3b13b479 100644 Binary files a/DSView/res/DSLogicPro.bin and b/DSView/res/DSLogicPro.bin differ diff --git a/libsigrok4DSL/dsdevice.c b/libsigrok4DSL/dsdevice.c index fc324d11..ec0346f6 100644 --- a/libsigrok4DSL/dsdevice.c +++ b/libsigrok4DSL/dsdevice.c @@ -369,10 +369,10 @@ SR_API GSList *sr_dev_list(const struct sr_dev_driver *driver) return NULL; } -SR_API GSList *sr_dev_mode_list(const struct sr_dev_driver *driver) +SR_API GSList *sr_dev_mode_list(const struct sr_dev_inst *sdi) { - if (driver && driver->dev_mode_list) - return driver->dev_mode_list(); + if (sdi && sdi->driver && sdi->driver->dev_mode_list) + return sdi->driver->dev_mode_list(sdi); else return NULL; } diff --git a/libsigrok4DSL/hardware/DSL/dscope.c b/libsigrok4DSL/hardware/DSL/dscope.c index 404a18a8..68bc356c 100644 --- a/libsigrok4DSL/hardware/DSL/dscope.c +++ b/libsigrok4DSL/hardware/DSL/dscope.c @@ -767,8 +767,9 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static GSList *dev_mode_list(void) +static GSList *dev_mode_list(const struct sr_dev_inst *sdi) { + (void)sdi; GSList *l = NULL; int i; diff --git a/libsigrok4DSL/hardware/DSL/dslogic.c b/libsigrok4DSL/hardware/DSL/dslogic.c index dede3340..806d5f43 100644 --- a/libsigrok4DSL/hardware/DSL/dslogic.c +++ b/libsigrok4DSL/hardware/DSL/dslogic.c @@ -47,6 +47,10 @@ static struct sr_dev_mode mode_list[] = { {"OSC", DSO}, }; +static struct sr_dev_mode pro_mode_list[] = { + {"LA", LOGIC}, +}; + static const char *opmodes[] = { "Normal", "Internal Test", @@ -833,15 +837,20 @@ static GSList *dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static GSList *dev_mode_list(void) +static GSList *dev_mode_list(const struct sr_dev_inst *sdi) { GSList *l = NULL; int i; - for(i = 0; i < ARRAY_SIZE(mode_list); i++) { - l = g_slist_append(l, &mode_list[i]); + if (strcmp(sdi->model, "DSLogic Pro") == 0) { + for(i = 0; i < ARRAY_SIZE(pro_mode_list); i++) { + l = g_slist_append(l, &pro_mode_list[i]); + } + } else { + for(i = 0; i < ARRAY_SIZE(mode_list); i++) { + l = g_slist_append(l, &mode_list[i]); + } } - return l; } diff --git a/libsigrok4DSL/hardware/demo/demo.c b/libsigrok4DSL/hardware/demo/demo.c index 39b4e32b..b48a211c 100644 --- a/libsigrok4DSL/hardware/demo/demo.c +++ b/libsigrok4DSL/hardware/demo/demo.c @@ -266,8 +266,9 @@ static GSList *hw_dev_list(void) return ((struct drv_context *)(di->priv))->instances; } -static GSList *hw_dev_mode_list(void) +static GSList *hw_dev_mode_list(const struct sr_dev_inst *sdi) { + (void)sdi; GSList *l = NULL; int i; diff --git a/libsigrok4DSL/libsigrok.h b/libsigrok4DSL/libsigrok.h index d6c8218f..3de797b9 100644 --- a/libsigrok4DSL/libsigrok.h +++ b/libsigrok4DSL/libsigrok.h @@ -966,7 +966,7 @@ struct sr_dev_driver { int (*cleanup) (void); GSList *(*scan) (GSList *options); GSList *(*dev_list) (void); - GSList *(*dev_mode_list) (void); + GSList *(*dev_mode_list) (const struct sr_dev_inst *sdi); int (*dev_clear) (void); int (*config_get) (int id, GVariant **data, diff --git a/libsigrok4DSL/proto.h b/libsigrok4DSL/proto.h index bbdcc12f..4ff18d18 100644 --- a/libsigrok4DSL/proto.h +++ b/libsigrok4DSL/proto.h @@ -53,7 +53,7 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum, const char *trigger); SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key); SR_API GSList *sr_dev_list(const struct sr_dev_driver *driver); -SR_API GSList *sr_dev_mode_list(const struct sr_dev_driver *driver); +SR_API GSList *sr_dev_mode_list(const struct sr_dev_inst *sdi); SR_API int sr_dev_clear(const struct sr_dev_driver *driver); SR_API int sr_dev_open(struct sr_dev_inst *sdi); SR_API int sr_dev_close(struct sr_dev_inst *sdi);