[En-Nut-Discussion] Problem: read uart port

Harald Kipp harald.kipp at egnite.de
Thu Mar 19 20:51:43 CET 2009



samkol chea wrote:
> int got;
> static char inbuf[58];
> got = _read(_fileno(uart), inbuf, 58);
> 
> The
> problem is that I want to read 58 bytes from the UART port, but the
> read function always returns 'got' less than 58. Do you know why?

Because read is designed like this:
http://linux.die.net/man/2/read

Harald




More information about the En-Nut-Discussion mailing list