This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ECOS] io_read


On Mon, Oct 18, 2004 at 11:22:30AM +0200, Sicheri Marco wrote:
> Hi,
> I resolve my problem, I read the source. Thanks!
> This is my code:
> if (cyg_io_select(ctsUartHandle[uartID], CYG_FREAD, uartInfo) == false)
>     return (CPSRC_UART_NOTREADY);
> else
> {
>     uartBufLen = 1;
>     err = cyg_io_read(ctsUartHandle[uartID], &uartChar, &uartBufLen);
>     ...
> }
> Thank all for yours answer.
> 
> But:
> I can use the read() or the cyg_io_read()...
> Which do you recommend to use? read() or cyg_io_read()? Or are they alike
> right?

The advantage of using read() and select() etc is that they are
POSIX. So if you need to port to code some some other RTOS it should
be much easier.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]