freemyipod r55 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r54‎ | r55 | r56 >
Date:21:20, 8 August 2010
Author:benedikt93
Status:new
Tags:
Comment:
fixed usb.c to match the EmBIOS Monitor Protocol
Modified paths:
  • /embios/trunk/usb/usb.c (modified) (history)

Diff [purge]

Index: embios/trunk/usb/usb.c
@@ -463,8 +463,8 @@
464464 dbgsendbuf[0] = 1;
465465 dbgsendbuf[1] = SCHEDULER_THREAD_INFO_VERSION;
466466 dbgsendbuf[2] = MAX_THREADS * sizeof(struct scheduler_thread);
467 - memcpy(&dbgsendbuf[4], scheduler_threads, dbgrecvbuf[1]);
468 - size = dbgrecvbuf[1] + 16;
 467+ memcpy(&dbgsendbuf[4], (void*)((uint32_t)scheduler_threads + dbgrecvbuf[1]), dbgrecvbuf[2]);
 468+ size = dbgrecvbuf[2] + 16;
469469 break;
470470 case 16: // FREEZE SCHEDULER
471471 dbgsendbuf[1] = scheduler_freeze(dbgrecvbuf[1]);
@@ -490,7 +490,7 @@
491491 dbgsendbuf[0] = 1;
492492 size = 16;
493493 break;
494 - case 19: // KILL THREAD
 494+ case 19: // CREATE THREAD
495495 dbgsendbuf[0] = 1;
496496 dbgsendbuf[1] = thread_create((const char*)dbgsendbuf[1], (const void*)dbgsendbuf[2],
497497 (char*)dbgsendbuf[3], dbgsendbuf[4], dbgsendbuf[5],