Naming convention.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 23 Jun 2009 03:49:58 +0000 (03:49 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 23 Jun 2009 03:49:58 +0000 (03:49 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@58 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/chipcon/chipcon.c
firmware/include/chipcon.h

index 45a27e7..d4e8177 100644 (file)
@@ -127,7 +127,7 @@ void cchandle(unsigned char app,
               unsigned char verb,
               unsigned char len){
   switch(verb){
               unsigned char verb,
               unsigned char len){
   switch(verb){
-    //PEEK and POKE will come later.
+    //CC_PEEK and CC_POKE will come later.
   case READ:  //Write a command and return 1-byte reply.
     cccmd(len);
     ccread(1);
   case READ:  //Write a command and return 1-byte reply.
     cccmd(len);
     ccread(1);
@@ -205,18 +205,19 @@ void cchandle(unsigned char app,
 
   //Macro commands
   case CC_READ_CODE_MEMORY:
 
   //Macro commands
   case CC_READ_CODE_MEMORY:
-    cmddata[0]=peekcodebyte(cmddataword[0]);
+    cmddata[0]=cc_peekcodebyte(cmddataword[0]);
     txdata(app,verb,1);
     break;
   case CC_READ_XDATA_MEMORY:
     txdata(app,verb,1);
     break;
   case CC_READ_XDATA_MEMORY:
-    cmddata[0]=peekdatabyte(cmddataword[0]);
+    cmddata[0]=cc_peekdatabyte(cmddataword[0]);
     txdata(app,verb,1);
     break;
   case CC_WRITE_XDATA_MEMORY:
     txdata(app,verb,1);
     break;
   case CC_WRITE_XDATA_MEMORY:
-    cmddata[0]=pokedatabyte(cmddataword[0], cmddata[2]);
+    cmddata[0]=cc_pokedatabyte(cmddataword[0], cmddata[2]);
     txdata(app,verb,1);
     break;
   case CC_SET_PC:
     txdata(app,verb,1);
     break;
   case CC_SET_PC:
+    
   case CC_CLOCK_INIT:
   case CC_WRITE_FLASH_PAGE:
   case CC_MASS_ERASE_FLASH:
   case CC_CLOCK_INIT:
   case CC_WRITE_FLASH_PAGE:
   case CC_MASS_ERASE_FLASH:
@@ -281,7 +282,6 @@ unsigned short cc_get_pc(){
   return cmddataword[0];
 }
 
   return cmddataword[0];
 }
 
-
 //! Set a hardware breakpoint.
 void cc_set_hw_brkpnt(unsigned short adr){
   cmddataword[0]=adr;
 //! Set a hardware breakpoint.
 void cc_set_hw_brkpnt(unsigned short adr){
   cmddataword[0]=adr;
@@ -345,7 +345,7 @@ unsigned char cc_debug(unsigned char len,
 }
 
 //! Fetch a byte of code memory.
 }
 
 //! Fetch a byte of code memory.
-unsigned char peekcodebyte(unsigned long adr){
+unsigned char cc_peekcodebyte(unsigned long adr){
   /** See page 9 of SWRA124 */
   unsigned char bank=adr>>15,
     lb=adr&0xFF,
   /** See page 9 of SWRA124 */
   unsigned char bank=adr>>15,
     lb=adr&0xFF,
@@ -371,7 +371,7 @@ unsigned char peekcodebyte(unsigned long adr){
 
 
 //! Set a byte of data memory.
 
 
 //! Set a byte of data memory.
-unsigned char pokedatabyte(unsigned int adr,
+unsigned char cc_pokedatabyte(unsigned int adr,
                           unsigned char val){
   unsigned char
     hb=(adr&0xFF00)>>8,
                           unsigned char val){
   unsigned char
     hb=(adr&0xFF00)>>8,
@@ -396,7 +396,7 @@ for (n = 0; n < count; n++) {
 }
 
 //! Fetch a byte of data memory.
 }
 
 //! Fetch a byte of data memory.
-unsigned char peekdatabyte(unsigned int adr){
+unsigned char cc_peekdatabyte(unsigned int adr){
   unsigned char
     hb=(adr&0xFF00)>>8,
     lb=adr&0xFF,
   unsigned char
     hb=(adr&0xFF00)>>8,
     lb=adr&0xFF,
index 3289c7e..9232074 100644 (file)
@@ -18,12 +18,12 @@ void cc_set_hw_brkpnt(unsigned short);
 //! Debug an instruction, for remote use.
 void cc_debug_instr(unsigned char);
 //!Read a byte of code memory.
 //! Debug an instruction, for remote use.
 void cc_debug_instr(unsigned char);
 //!Read a byte of code memory.
-unsigned char peekcodebyte(unsigned long adr);
+unsigned char cc_peekcodebyte(unsigned long adr);
 //!Read a byte of data memory.
 //!Read a byte of data memory.
-unsigned char peekdatabyte(unsigned int adr);
+unsigned char cc_peekdatabyte(unsigned int adr);
 //! Set a byte of data memory.
 //! Set a byte of data memory.
-unsigned char pokedatabyte(unsigned int adr,
-                          unsigned char val);
+unsigned char cc_pokedatabyte(unsigned int adr,
+                             unsigned char val);
 //! Debug an instruction, for local use.
 unsigned char cc_debug(unsigned char len,
                       unsigned char a,
 //! Debug an instruction, for local use.
 unsigned char cc_debug(unsigned char len,
                       unsigned char a,