This is the mail archive of the ecos-discuss@sourceware.org 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: Asyn serial io


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


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