cancel
Showing results for 
Search instead for 
Did you mean: 

Basic question: String/ Char. output to LCD/ UART

L C
Associate II
Posted on May 29, 2017 at 03:04

Hello!

I have success to access LCD(ili9341).

And let it display characters. Note the code for string/char to LCD display still under develop.

In general of C, many case use 'printf' for output.

Q1) How can I to use 'printf'? e.g. include stdio.h and then ....?

Sorry I am beginner of C, please give me some information/guild to lean,.

In AVR, they have something to transfer printf string stream to specific LCD driver.

static FILE mydata = FDEV_SETUP_STREAM(ili9341_putchar_printf, NULL, _FDEV_SETUP_WRITE);//mydata declaration and converting it into stream

Q2) How to manage printf for different kind of output such LCD & UART?

In some system, they have LCD for display(in operation) AND using UART communicate with PC for remote/ data logging or trace logging.

If only one 'printf', how to operate between different output device.

Please share your comment/ experience to me.

BR

LC

11 REPLIES 11
L C
Associate II
Posted on June 04, 2017 at 03:26

mich.lei

I am understand. Thanks

LC

Posted on July 20, 2017 at 07:59

This is not a toolchain issue.

Seems you have defined some variables twice (

LCD_H, LCD_W, cursor_x, cursor_y

), one coming from

ILI9432.o

, and one from

main.o

. Probably means 

ILI9432.c

, and one from

main.c

.

Convert one definition into a declaration.