From: Abraham vd M. <ab...@us...> - 2002-02-05 13:40:51
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv15305/doc Added Files: developers.txt Log Message: Added a printf()-like function for printing to the serial port. Also some minor code cleanup in the memory checking routines. --- NEW FILE: developers.txt --- Some notes for developers: 1. About SerialPrintf(): Please note that SerialPrintf() only provide very primitive printf() support. The idea was to get rid of things like this: SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); SerialOutputString(" p1=0x"); SerialOutputHex((u32)bp1); SerialOutputString(" p2=0x"); SerialOutputHex((u32)bp2); SerialOutputString(" count=0x"); SerialOutputHex((u32)count); SerialOutputString("\n"); and replace it instead with: SerialPrintf ("chkmem: method: %s\n" " p1=0x%x p2=0x%x count=0x%x\n", __FUNCTION__,(u32) bp1,(u32) bp2,(u32) count); Currently SerialPrintf() can do the following conversions: c char s char * d,i int u unsigned int x unsigned int (hex) p void * There is no floating point support and no modifiers. Also, please note that if you port blob to some 8-bit or 16-bit platform, you might run into some trouble with the conversions (easy to change/fix though). |