int main(void)
{
Init(); //init the system
fdevopen(&sys_putchar,NULL);//wire in stdout to sys_putchar
return 0;
}
//simple function that receive chars from stdout
int sys_putchar(char val,FILE* fle)
{
//write out to the LCD for now
LCD_putchar(val);
//Put code here to pump a char to the uart port!
//TODO: uart_putchar
return 0;
}
Let me know if this doenst work! I wish I would have known about this earlier!
No comments:
Post a Comment