public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sicheri Marco <m.sicheri@ctsgroup.it>
Cc: "eCos Dev.List" <ecos-devel@sources.redhat.com>
Subject: Re: [ECOS] io_read
Date: Mon, 18 Oct 2004 09:36:00 -0000	[thread overview]
Message-ID: <20041018093607.GU2141@lunn.ch> (raw)
In-Reply-To: <002f01c4b4f3$fdfdae50$110110ac@Msicheri>

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

      reply	other threads:[~2004-10-18  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <010901c4ad48$b4ca3da0$110110ac@Msicheri>
     [not found] ` <20041008151913.GI28515@lunn.ch>
     [not found]   ` <011601c4ad4b$573e9c50$110110ac@Msicheri>
2004-10-18  9:20     ` Sicheri Marco
2004-10-18  9:36       ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041018093607.GU2141@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-devel@sources.redhat.com \
    --cc=m.sicheri@ctsgroup.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).