cancel
Showing results for 
Search instead for 
Did you mean: 

lcd_log.c for SD

jspika
Associate II
Posted on February 19, 2014 at 22:33

Hello,

 i saw this library at USB-host example. I decided to try use this library not with USB but with SD card. I am trying to get understand how this library works, but it doesnt seems to be so easy.

I have problem with

understanding

of LCD_LOG_Exported_Macros.

for example :

#define  LCD_UsrLog(...)    LCD_LineColor = LCD_LOG_DEFAULT_COLOR;\

                                            printf(__VA_ARGS__);\

In main program i use:

LCD_UsrLog(''> Hello.\n'');

LCD_UsrLog(''> Hi.\n'');

Both texts are written on LCD 2nd one under the 1st one.

I have no clue, what part of code does that? Does any1 has an experience with this library? Can some1 please explain me, how does it works?

Thanks a lot, Jan

2 REPLIES 2
Posted on February 19, 2014 at 22:57

The STDIO character output stream is captured and directed to the LCD

PUTCHAR_PROTOTYPE

How exactly this integrates depends on the compiler/tool-chain used.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jspika
Associate II
Posted on February 19, 2014 at 23:43

Thx for answer, now I see the connection between

__VA_ARGS__

macros and PUTCHAR_PROTOTYPE