Hi, there an example in CARM user guide:
#include <stdio.h> void test_getkey (void) { while ((c = _getkey ()) != 0x1B) { printf ("key = %c %bu %bx\n", c, c, c); } }
So what's the meaning of %bu and %bx? I can compile it, but responce is ey = a Bu Bx after pressing an a
"So what's the meaning of %bu and %bx?"
Please read the manual: http://www.keil.com/support/man/docs/ca/ca_printf.htm
"responce is ey = a Bu Bx"
Are you sure you typed it all correctly in your source file? It looks like you have omitted the percent signs '%', or maybe put in some spurious spaces? The missing 'K' could mean that your serial IO support is broken...
Where is your definition of c?
Well, actually the FM says no notin 'bout "%b" type or flag...
View all questions in Keil forum