summaryrefslogtreecommitdiff
path: root/ports/posix/src/stream_stdio.c
blob: efa4b13af89a79208cbf49b65406e0d7e6b89fc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include "stream_stdio.h"
#include "stream.h"

int stdio_read(uint8_t* buf, size_t count, void **vptr, void *sptr)
{
    int x;
    for (x = 0; x < count; x++) {
	scanf("%c", &buf[x]);
    }
    return 0;
}

int stdio_write(uint8_t* buf, size_t count, void **vptr, void *sptr)
{
    printf("%s\n", buf);
    return 0;
}