00001 #define USELIBRARY
00002
00003 #include <iostream>
00004
00005 #include "../TApi.h"
00006
00007 using namespace std;
00008
00009 void DspDump();
00010
00011 TApi *tapi = 0;
00012
00013 int main () {
00014 DspDump();
00015 }
00016
00017 void DspDump () {
00018
00019
00020 if(!tapi)
00021 tapi = new TApi();
00022
00023 tapi->initialiseAll(0);
00024
00025
00026
00027 char response;
00028 do {
00029 int dspNumber, dspStart, dspEnd;
00030
00031 cout << "DSP number (-1 for Master):";
00032 cin >> dspNumber;
00033 hex(cin);
00034 cout << "Starting address (hex): ";
00035 cin >> dspStart;
00036 cout << "Ending address (hex): ";
00037 cin >> dspEnd;
00038 dec(cin);
00039 if(dspEnd < dspStart) {
00040 cout << "Start must be less than end, skipping\n";
00041 } else {
00042 int numWords = (dspEnd +1 - dspStart)/4;
00043
00044 tapi->dspBlockDump(0, dspStart, numWords, dspNumber);
00045 }
00046
00047
00048 cout << "Do another? [Y/n]: ";
00049 cin >> response;
00050 } while (response != 'n');
00051
00052
00053 delete tapi;
00054
00055 return ;
00056 }
00057
00058