??? 11/28/08 18:10 Read: times |
#160383 - Retyping or copying? Responding to: ???'s previous message |
Several strange things here (but you should have posted your example as code too).
Your formatting strings starts with " r " - there should have been a " r " in the output - before the date/time. Your formatting string ends with a " n". It should have ended with a "n" to signal a new line. Putchar contains the line: if ( c == 'n') But the line should have looked like: if (c == 'n') Are you sure that you have copied - and not retyped - the code from the Keil application note? There may be other errors too. And have you made sure that OLEN has a value of 2^n, where n is >= 1? If not, the expression "outbuf[oend++ & (OLEN-1)]" will not work as expected. OLEN must be a number that in the binary number system starts with a one, and is followed by one or more zeros, i.e. 2, 4, 8, 16, 32, ... This makes sure that (OLEN-1) will be a binary value containing a continuous sequence of ones. |
Topic | Author | Date |
Extra "R" in printf | 01/01/70 00:00 | |
Retyping or copying? | 01/01/70 00:00 | |
The escaping escape character![]() | 01/01/70 00:00 |