READ command only returns a byte if it is supposed to by the command structure.
[goodfet] / 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);
-    ccread(1);
+    if(cmddata[0]&0x4)
+      ccread(1);
     txdata(app,verb,1);
+    
     break;
   case WRITE: //Write a command with no reply.
     cccmd(len);