Пример #1
0
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;
    }
}
Пример #2
0
int uart_write(void *fp,char c)
{
    putcharIntoBuffer(c);
    return 1;
}
Пример #3
0
void putsIntoBuffer(char *s) {
    while(*s) {
        putcharIntoBuffer(*s++);
    }
}