MobileLCD Question

19 Feb 2010

Im just studying the library for MobileLCD (because im trying to do somthing similar with an on screen display) and i cant seem to see a printf function...

 

can anybody shed some light on how the printf function works please? i see a putc function (although its private) and im quite happy with how it matches the ascii value to the array i just cant see where the program would go on a printf! Im thinking maybe its using the MBed library printf function and returning ascii as putc's but im not completely sure.

 

thanks, martin.

19 Feb 2010

As far as I remember it's part of the Stream class (from which MobileLCD inherits), you might also be interested in the Graphics library (http://mbed.org/projects/cookbook/wiki/Graphics) which add some higher level drawing commands on top of the MobileLCD interface (although it may need updating slightly).

20 Feb 2010

wow thanks for that! im still stuck with the origins of the printf but that will probably distract me for some time!

20 Feb 2010 . Edited: 20 Feb 2010

Like I said, printf is part of the Stream class: http://mbed.org/projects/libraries/svn/mbed/trunk/Stream.h