freemyipod r175 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r174‎ | r175 | r176 >
Date:15:36, 24 August 2010
Author:theseven
Status:new
Tags:
Comment:
Monitor protocol change: transfer length 0 for I2C transfers means 256 bytes
Modified paths:
  • /embios/trunk/usb/usb.c (modified) (history)

Diff [purge]

Index: embios/trunk/usb/usb.c
@@ -400,6 +400,7 @@
401401 dbgi2cslave = (dbgrecvbuf[1] >> 8) & 0xff;
402402 dbgactionaddr = (dbgrecvbuf[1] >> 16) & 0xff;
403403 dbgactionlength = dbgrecvbuf[1] >> 24;
 404+ if (!dbgactionlength) dbgactionlength = 256;
404405 break;
405406 case 9: // WRITE I2C
406407 if (set_dbgaction(DBGACTION_I2CSEND, 0)) break;
@@ -407,6 +408,7 @@
408409 dbgi2cslave = (dbgrecvbuf[1] >> 8) & 0xff;
409410 dbgactionaddr = (dbgrecvbuf[1] >> 16) & 0xff;
410411 dbgactionlength = dbgrecvbuf[1] >> 24;
 412+ if (!dbgactionlength) dbgactionlength = 256;
411413 memcpy(dbgasyncsendbuf, &dbgsendbuf[4], dbgactionlength);
412414 break;
413415 #endif