public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Andre Bender <andre.bender@gmx.de>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Asyn serial io
Date: Fri, 08 Jun 2007 14:09:00 -0000	[thread overview]
Message-ID: <20070608122954.GB14051@lunn.ch> (raw)
In-Reply-To: <46691664.9070304@gmx.de>

On Fri, Jun 08, 2007 at 10:42:12AM +0200, Andre Bender wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Hi,
> 
> the online documentation leaves me slightly puzzeled when atemting to
> figure out how to set a serial port to asynchronus mode.
> 
> I know I should use the cyg_io_set_config function with
> CYG_IO_SET_CONFIG_SERIAL_READ/WRITE_BLOCKING. What I can't figure out
> wether the value 1 is blocking or non blocking. (possible values are 0
> and 1 according to the online docu)

<Obi-Wan Kenobi>
Use the source Luke.
</Obi-Wan Kenobi>

    case CYG_IO_SET_CONFIG_READ_BLOCKING:
        if (*len < sizeof(cyg_uint32) || 0 == in_cbuf->len) {
            return -EINVAL;
        }
        in_cbuf->blocking = (1 == *(cyg_uint32*)xbuf) ? true : false;
        break;
    case CYG_IO_SET_CONFIG_WRITE_BLOCKING:
        if (*len < sizeof(cyg_uint32) || 0 == out_cbuf->len) {
            return -EINVAL;
        }
        out_cbuf->blocking = (1 == *(cyg_uint32*)xbuf) ? true : false;
        break;

So a value of 1 sets ->blocking to true.

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2007-06-08 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 12:30 Andre Bender
2007-06-08 14:09 ` 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=20070608122954.GB14051@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andre.bender@gmx.de \
    --cc=ecos-discuss@sources.redhat.com \
    /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).