##// END OF EJS Templates
dsu3plugin: added cacheIsEnable function.
Jeandet Alexis -
r70:a16dfc6c4beb default
parent child
Show More
@@ -170,6 +170,18 bool dsu3plugin::cacheEnable()
170 return setCacheEnable(true);
170 return setCacheEnable(true);
171 }
171 }
172
172
173 bool dsu3plugin::cacheIsEnable()
174 {
175 if(parent==NULL)
176 return false;
177 unsigned int DSUBASEADDRESS = SocExplorerEngine::self()->getEnumDeviceBaseAddress(this,0x01 , 0x004,0);
178 if(DSUBASEADDRESS == (unsigned int)-1)
179 DSUBASEADDRESS = 0x90000000;
180 WriteRegs(uIntlist()<<2,DSUBASEADDRESS+0x400024);
181 unsigned int reg = ReadReg(DSUBASEADDRESS+0x700000);
182 return ((reg&0x0F)==0x0F);
183 }
184
173 bool dsu3plugin::setCacheEnable(bool enabled)
185 bool dsu3plugin::setCacheEnable(bool enabled)
174 {
186 {
175 if(parent==NULL)
187 if(parent==NULL)
@@ -313,13 +325,6 void dsu3plugin::writeSection(const QStr
313 }
325 }
314
326
315
327
316 unsigned int dsu3plugin::Write(unsigned int *Value,unsigned int count,unsigned int address)
317 {
318 if(parent!=NULL)
319 return parent->Write(Value,count,address);
320 return 0;
321 }
322
323 bool dsu3plugin::memSet(unsigned int address,int value, unsigned int count)
328 bool dsu3plugin::memSet(unsigned int address,int value, unsigned int count)
324 {
329 {
325 unsigned int* buffer = (unsigned int*)malloc(count*sizeof(unsigned int));
330 unsigned int* buffer = (unsigned int*)malloc(count*sizeof(unsigned int));
@@ -332,10 +337,3 bool dsu3plugin::memSet(unsigned int add
332 }
337 }
333 return false;
338 return false;
334 }
339 }
335
336 unsigned int dsu3plugin::Read(unsigned int *Value,unsigned int count, unsigned int address)
337 {
338 if(parent!=NULL)
339 return parent->Read(Value,count,address);
340 return 0;
341 }
@@ -42,13 +42,12 public:
42 ~dsu3plugin();
42 ~dsu3plugin();
43 bool memSet(unsigned int address, int value, unsigned int count);
43 bool memSet(unsigned int address, int value, unsigned int count);
44 public slots:
44 public slots:
45 unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0);
46 unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0);
47 void openFile();
45 void openFile();
48 void openFile(QString fileName);
46 void openFile(QString fileName);
49 bool configureTarget();
47 bool configureTarget();
50 bool cacheDisable();
48 bool cacheDisable();
51 bool cacheEnable();
49 bool cacheEnable();
50 bool cacheIsEnable();
52 bool setCacheEnable(bool enabled);
51 bool setCacheEnable(bool enabled);
53 bool flashTarget();
52 bool flashTarget();
54 void run();
53 void run();
@@ -25,7 +25,7
25 #include <socexplorerengine.h>
25 #include <socexplorerengine.h>
26 #include <qhexedit.h>
26 #include <qhexedit.h>
27
27
28 QString dwLinkStatusQString[6] = {
28 const QString dwLinkStatusQString[6] = {
29 "CFG_SPACEWIRE_ERROR_RESET",
29 "CFG_SPACEWIRE_ERROR_RESET",
30 "CFG_SPACEWIRE_ERROR_WAIT",
30 "CFG_SPACEWIRE_ERROR_WAIT",
31 "CFG_SPACEWIRE_READY",
31 "CFG_SPACEWIRE_READY",
General Comments 0
You need to be logged in to leave comments. Login now