d8201077fb5c441e0314e83ffd17b8c53919687c
[goodfet] / firmware / apps / monitor / monitor.c
1 #include "command.h"
2
3 //! Handles a monitor command.
4 void monitorhandle(unsigned char app,
5                    unsigned char verb,
6                    unsigned char len){
7   switch(verb){
8   case PEEK:
9     cmddata[0]=memorybyte[cmddataword[0]];
10     txdata(app,verb,1);
11     break;
12   case POKE:
13     //Todo, make word or byte.
14     memorybyte[cmddataword[0]]=cmddata[2];
15     cmddata[0]=memorybyte[cmddataword[0]];
16     txdata(app,verb,1);
17     break;
18   case MONITOR_CHANGE_BAUD:
19     //This command, and ONLY this command, does not reply.
20     setbaud(cmddata[0]);
21     //txdata(app,verb,0);
22     break;
23   }
24 }