int fputc_uart(int c, Stream *stream) { char ch; if (stream->device_instance == UART2) { ch = (char) c; //uartPutchar(UART2_BASE_PTR, ch); putcharIntoBuffer(ch); return ch; } else { return CANNOT_PUT_CHAR; } }
int uart_write(void *fp,char c) { putcharIntoBuffer(c); return 1; }
void putsIntoBuffer(char *s) { while(*s) { putcharIntoBuffer(*s++); } }