summaryrefslogtreecommitdiff
path: root/utils/regtools/qeditor/regtab.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-04 00:18:51 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:25 +0100
commit0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e (patch)
treeaca4cf3c5dd86384ee8018d9049e2c3469d597ea /utils/regtools/qeditor/regtab.h
parent81dfed27cf7ca1008b9cf21c084310eaeae082ac (diff)
downloadrockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.tar.gz
rockbox-0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e.zip
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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/regtab.h b/utils/regtools/qeditor/regtab.h
index 7ec8c9009f..d570eb6f90 100644
--- a/utils/regtools/qeditor/regtab.h
+++ b/utils/regtools/qeditor/regtab.h
@@ -25,6 +25,9 @@ enum
25{ 25{
26 DataSelNothing, 26 DataSelNothing,
27 DataSelFile, 27 DataSelFile,
28#ifdef HAVE_HWSTUB
29 DataSelDevice,
30#endif
28}; 31};
29 32
30class RegTreeItem : public QTreeWidgetItem 33class RegTreeItem : public QTreeWidgetItem
@@ -56,6 +59,10 @@ protected:
56 soc_reg_t& reg, soc_reg_addr_t& reg_addr); 59 soc_reg_t& reg, soc_reg_addr_t& reg_addr);
57 void SetDataSocName(const QString& socname); 60 void SetDataSocName(const QString& socname);
58 QComboBox *m_soc_selector; 61 QComboBox *m_soc_selector;
62#ifdef HAVE_HWSTUB
63 QComboBox *m_dev_selector;
64 HWStubBackendHelper m_hwstub_helper;
65#endif
59 Backend *m_backend; 66 Backend *m_backend;
60 QTreeWidget *m_reg_tree; 67 QTreeWidget *m_reg_tree;
61 soc_t m_cur_soc; 68 soc_t m_cur_soc;
@@ -71,6 +78,10 @@ protected:
71 QListWidget *m_analysers_list; 78 QListWidget *m_analysers_list;
72 79
73private slots: 80private slots:
81#ifdef HAVE_HWSTUB
82 void OnDevListChanged();
83 void OnDevChanged(int index);
84#endif
74 void OnSocChanged(const QString& text); 85 void OnSocChanged(const QString& text);
75 void OnSocListChanged(); 86 void OnSocListChanged();
76 void OnRegItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); 87 void OnRegItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);