diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-04 00:18:51 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 23:14:25 +0100 |
| commit | 0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e (patch) | |
| tree | aca4cf3c5dd86384ee8018d9049e2c3469d597ea /utils/regtools/qeditor/regtab.h | |
| parent | 81dfed27cf7ca1008b9cf21c084310eaeae082ac (diff) | |
| download | rockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.zip rockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.tar.gz rockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.tar.bz2 rockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.tar.xz | |
utils/regtools: make qeditor able to poke directly at a hwstub device
This commit add the very handy feature of being able to read registers
directly from a device using hwstub. This is mostly trivial using the hwstub
library and the biggest change here is actually:
- being able to read registers by name and/or addresses
- being able to enumerate devives
The UI code currently doesn't handle hotplug but the backend does so it should
be trivial to add in the future. It also opens up the possibility the write
registers from hwstub or save the register values to a file.
Since it relies on both hwstub and libusb, a switch has been introduced in
qmake to disable it (use -config nohwstub).
Change-Id: I5d7d7a2a7c97ecd7407227357c8553c2773ea6cc
Diffstat (limited to 'utils/regtools/qeditor/regtab.h')
| -rw-r--r-- | utils/regtools/qeditor/regtab.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/regtab.h b/utils/regtools/qeditor/regtab.h index 7ec8c90..d570eb6 100644 --- a/utils/regtools/qeditor/regtab.h +++ b/utils/regtools/qeditor/regtab.h @@ -25,6 +25,9 @@ enum { DataSelNothing, DataSelFile, +#ifdef HAVE_HWSTUB + DataSelDevice, +#endif }; class RegTreeItem : public QTreeWidgetItem @@ -56,6 +59,10 @@ protected: soc_reg_t& reg, soc_reg_addr_t& reg_addr); void SetDataSocName(const QString& socname); QComboBox *m_soc_selector; +#ifdef HAVE_HWSTUB + QComboBox *m_dev_selector; + HWStubBackendHelper m_hwstub_helper; +#endif Backend *m_backend; QTreeWidget *m_reg_tree; soc_t m_cur_soc; @@ -71,6 +78,10 @@ protected: QListWidget *m_analysers_list; private slots: +#ifdef HAVE_HWSTUB + void OnDevListChanged(); + void OnDevChanged(int index); +#endif void OnSocChanged(const QString& text); void OnSocListChanged(); void OnRegItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); |