@@ -1,4 +1,4 | |||
|
1 | 2c82d72694590cbc2aebb946667f11f60ea89afe src/SocExplorerEngine/PeripheralWidget | |
|
1 | 9790824220ca06014e65a5c13aa4ed37f89d7593 src/SocExplorerEngine/PeripheralWidget | |
|
2 | 2 | cc958c79ba0939809a70e63b8bac798930160243 src/common/genericBinaryFiles |
|
3 | 3 | 2dce25b198558be573f56c1cf337aa95ddd666d6 src/common/lppserial |
|
4 | 4 | 923afde9cc96bb419cf898560d080ec96991aeca src/common/qhexedit |
@@ -10,3 +10,7 QGroupBox::title { | |||
|
10 | 10 | padding: 0 3px 0 3px; |
|
11 | 11 | } |
|
12 | 12 | |
|
13 | QWidget#CollapsablePeripheralWidget { | |
|
14 | border: 1px solid gray; | |
|
15 | border-radius: 9px; | |
|
16 | } |
@@ -67,6 +67,7 header.files = engine/socexplorerengine. | |||
|
67 | 67 | PeripheralWidget/src/peripheralwidget.h \ |
|
68 | 68 | PeripheralWidget/src/registerwidget.h \ |
|
69 | 69 | PeripheralWidget/src/socregsviewer.h \ |
|
70 | PeripheralWidget/src/socregsviewernew.h \ | |
|
70 | 71 | memtester/memtester.h |
|
71 | 72 | |
|
72 | 73 | |
@@ -124,7 +125,9 HEADERS += \ | |||
|
124 | 125 | proxy/socexplorerproxy.h \ |
|
125 | 126 | SOC/socexplorerenumdevice.h \ |
|
126 | 127 | PySocExplorerEngine.h \ |
|
127 | memtester/memtester.h | |
|
128 | memtester/memtester.h\ | |
|
129 | PeripheralWidget/src/socregsviewernew.h \ | |
|
130 | PeripheralWidget/src/collapsableperipheralwidget.h | |
|
128 | 131 | |
|
129 | 132 | |
|
130 | 133 | |
@@ -153,7 +156,9 SOURCES += \ | |||
|
153 | 156 | proxy/socexplorerproxy.cpp \ |
|
154 | 157 | SOC/socexplorerenumdevice.cpp \ |
|
155 | 158 | plugins/socexplorerplugin.cpp \ |
|
156 | memtester/memtester.cpp | |
|
159 | memtester/memtester.cpp \ | |
|
160 | PeripheralWidget/src/socregsviewernew.cpp \ | |
|
161 | PeripheralWidget/src/collapsableperipheralwidget.cpp | |
|
157 | 162 | |
|
158 | 163 | |
|
159 | 164 | OTHER_FILES += \ |
@@ -163,4 +168,10 OTHER_FILES += \ | |||
|
163 | 168 | pythongenerator.sh \ |
|
164 | 169 | pythonQtgeneratorCfg.txt |
|
165 | 170 | |
|
171 | FORMS += \ | |
|
172 | PeripheralWidget/src/socregsviewernew.ui \ | |
|
173 | PeripheralWidget/src/collapsableperipheralwidget.ui | |
|
166 | 174 | |
|
175 | ||
|
176 | RESOURCES += \ | |
|
177 | PeripheralWidget/ressources/peripheralwidget.qrc |
@@ -104,6 +104,7 void socexplorerproxy::loadSysDriver(soc | |||
|
104 | 104 | emit _self->clearMenu(); |
|
105 | 105 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
106 | 106 | SocExplorerEngine::addSOC(driver); |
|
107 | driver->postInstantiationTrigger(); | |
|
107 | 108 | } |
|
108 | 109 | |
|
109 | 110 | void socexplorerproxy::loadChildSysDriver(socexplorerplugin *parent, const QString child) |
@@ -6,7 +6,7 regsExplorer::regsExplorer(QWidget *pare | |||
|
6 | 6 | { |
|
7 | 7 | mainWidget = new QTabWidget; |
|
8 | 8 | cfg = new regsExplorerCfg; |
|
9 |
socViewer = new |
|
|
9 | socViewer = new SocRegsViewerNew(tr("No soc Detected"),this); | |
|
10 | 10 | this->setWidget(this->mainWidget); |
|
11 | 11 | this->mainWidget->addTab(this->cfg,"Config"); |
|
12 | 12 | this->mainWidget->addTab(this->socViewer,"View"); |
@@ -17,7 +17,8 regsExplorer::regsExplorer(QWidget *pare | |||
|
17 | 17 | |
|
18 | 18 | void regsExplorer::addDev(socExplorerEnumDevice *device) |
|
19 | 19 | { |
|
20 | peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),this); | |
|
20 | delegate.device = device; | |
|
21 | peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this); | |
|
21 | 22 | this->socViewer->addPeripheral(peripheral); |
|
22 | 23 | peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name()); |
|
23 | 24 | int startIndex,stopIndex; |
@@ -37,11 +38,11 void regsExplorer::addDev(socExplorerEnu | |||
|
37 | 38 | peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw); |
|
38 | 39 | } |
|
39 | 40 | } |
|
40 | connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32))); | |
|
41 | connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32))); | |
|
42 | QCheckBox* chkbx = this->cfg->addDev(device); | |
|
43 | chkbx->setChecked(true); | |
|
44 | connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool))); | |
|
41 | // connect(peripheral,SIGNAL(readRegSig(qint32)),device,SLOT(readReg(qint32))); | |
|
42 | // connect(peripheral,SIGNAL(writeRegSig(qint32,qint32)),device,SLOT(writeReg(qint32,qint32))); | |
|
43 | // QCheckBox* chkbx = this->cfg->addDev(device); | |
|
44 | // chkbx->setChecked(true); | |
|
45 | // connect(chkbx,SIGNAL(toggled(bool)),peripheral,SLOT(setVisible(bool))); | |
|
45 | 46 | } |
|
46 | 47 | |
|
47 | 48 |
@@ -31,10 +31,21 | |||
|
31 | 31 | #include <socexplorerengine.h> |
|
32 | 32 | #include <peripheralwidget.h> |
|
33 | 33 | #include <socregsviewer.h> |
|
34 | #include <socregsviewernew.h> | |
|
35 | ||
|
36 | ||
|
34 | 37 | |
|
35 | 38 | class regsExplorer : public QDockWidget |
|
36 | 39 | { |
|
37 | 40 | Q_OBJECT |
|
41 | class regExplorerReadWriteDelegate: public peripheralWidget::readWriteProxy | |
|
42 | { | |
|
43 | public: | |
|
44 | regExplorerReadWriteDelegate() {} | |
|
45 | void writeReg(qint32 address,qint32 value){if(device)device->writeReg(address,value);} | |
|
46 | qint32 readReg(qint32 address){if(device)return device->readReg(address);} | |
|
47 | socExplorerEnumDevice* device; | |
|
48 | }; | |
|
38 | 49 | public: |
|
39 | 50 | explicit regsExplorer(QWidget *parent = 0); |
|
40 | 51 | |
@@ -47,9 +58,9 public slots: | |||
|
47 | 58 | private: |
|
48 | 59 | QTabWidget* mainWidget; |
|
49 | 60 | regsExplorerCfg* cfg; |
|
50 | socRegsViewer* socViewer; | |
|
51 | ||
|
52 | ||
|
61 | // socRegsViewer* socViewer; | |
|
62 | SocRegsViewerNew* socViewer; | |
|
63 | regExplorerReadWriteDelegate delegate; | |
|
53 | 64 | }; |
|
54 | 65 | |
|
55 | 66 | #endif // REGSEXPLORER_H |
General Comments 0
You need to be logged in to leave comments.
Login now