public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Asyn serial io
@ 2007-06-08 12:30 Andre Bender
  2007-06-08 14:09 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Bender @ 2007-06-08 12:30 UTC (permalink / raw)
  To: ecos-discuss

-----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)

any help greatfully accepted

tia
Andre

- --

My public key can be found at
     http://www.keyserver.net
my fingerprint is
     302C FD91 2CE0 487E E086 EEBC D8D9 2865 E32F 4D56
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGaRZk29koZeMvTVYRCCNYAKCHtNSyX/cW9TohwRBnPaZAs2sAYQCeKVly
NistXFRytbu7s8CVsoFV4V8=
=FJos
-----END PGP SIGNATURE-----

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Asyn serial io
  2007-06-08 12:30 [ECOS] Asyn serial io Andre Bender
@ 2007-06-08 14:09 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2007-06-08 14:09 UTC (permalink / raw)
  To: Andre Bender; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-08 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 12:30 [ECOS] Asyn serial io Andre Bender
2007-06-08 14:09 ` Andrew Lunn

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).