From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23690 invoked by alias); 8 Jun 2007 12:30:06 -0000 Received: (qmail 23660 invoked by uid 22791); 8 Jun 2007 12:30:04 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Jun 2007 12:29:57 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1HwdbG-0003tC-00; Fri, 08 Jun 2007 14:29:54 +0200 Date: Fri, 08 Jun 2007 14:09:00 -0000 To: Andre Bender Cc: ecos-discuss@sources.redhat.com Message-ID: <20070608122954.GB14051@lunn.ch> Mail-Followup-To: Andre Bender , ecos-discuss@sources.redhat.com References: <46691664.9070304@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46691664.9070304@gmx.de> User-Agent: Mutt/1.5.13 (2006-08-11) From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Asyn serial io X-SW-Source: 2007-06/txt/msg00094.txt.bz2 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) Use the source Luke. 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