summaryrefslogtreecommitdiff
path: root/userspace/echoapp.c
blob: 4ff75e654e703016db23ff7cf6dc2999da6413dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

int main()
{
    printf("echo app -- press Q to quit\n");

    while(1)
    {
        uint8_t c;
        _read(0,&c,1);
        printf("%d",c);
        fflush(stdout);

        if(c=='q')break;
    }
}