READ command only returns a byte if it is supposed to by the command structure.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 6 Jan 2010 16:19:22 +0000 (16:19 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 6 Jan 2010 16:19:22 +0000 (16:19 +0000)
This shouldn't cause problems, but it might.

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@257 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/chipcon/chipcon.c

index 135d2a6..92542fc 100644 (file)
@@ -142,8 +142,10 @@ void cchandle(unsigned char app,
     break;
   case READ:  //Write a command and return 1-byte reply.
     cccmd(len);
     break;
   case READ:  //Write a command and return 1-byte reply.
     cccmd(len);
-    ccread(1);
+    if(cmddata[0]&0x4)
+      ccread(1);
     txdata(app,verb,1);
     txdata(app,verb,1);
+    
     break;
   case WRITE: //Write a command with no reply.
     cccmd(len);
     break;
   case WRITE: //Write a command with no reply.
     cccmd(len);