From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24085 invoked by alias); 15 Feb 2008 15:17:19 -0000 Received: (qmail 24076 invoked by uid 22791); 15 Feb 2008 15:17:18 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Feb 2008 15:16:52 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JQ2Ix-0006Yp-CJ for ecos-discuss@sources.redhat.com; Fri, 15 Feb 2008 15:16:47 +0000 Received: from c-76-17-159-23.hsd1.mn.comcast.net ([76.17.159.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Feb 2008 15:16:47 +0000 Received: from grante by c-76-17-159-23.hsd1.mn.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Feb 2008 15:16:47 +0000 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Fri, 15 Feb 2008 15:17:00 -0000 Message-ID: References: <20080214142959.285270@gmx.net> <20080214223117.258120@gmx.net> <20080214231112.62940@gmx.net> User-Agent: slrn/0.9.8.1 (Linux) 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: [ECOS] Re: Can't read with cyg_io_read() X-SW-Source: 2008-02/txt/msg00110.txt.bz2 Return-Path: X-Original-To: grante@shell.visi.com Delivered-To: grante@shell.visi.com Received: from g2host.com (mailback1.g2host.com [208.42.176.222]) by baal.visi.com (Postfix) with ESMTP id DFF0865101 for ; Fri, 15 Feb 2008 02:22:24 -0600 (CST) Received: from by mailback1.g2host.com (CommuniGate Pro RULES 5.1.14) with RULES id 8550970; Fri, 15 Feb 2008 02:22:11 -0600 X-Autogenerated: Mirror Resent-From: Resent-Date: Fri, 15 Feb 2008 02:22:11 -0600 Received: from spamfilter-21.visi.com ([208.42.184.21] verified) by mailfront1.g2host.com (CommuniGate Pro SMTP 5.1.14) with ESMTP id 37653588 for grante@visi.com; Fri, 15 Feb 2008 02:22:12 -0600 Received: from mail.gmx.net ([213.165.64.20]) by spamfilter-21.visi.com; Fri, 15 Feb 2008 02:22:22 -0600 X-RC-HOST: spamfilter-21.visi.com X-RC-DBID: 046c9cac-dc1e-47d7-acbb-d595ac2651b6 X-RC-ID: 20080215082222709 X-RC-IP: 213.165.64.20 X-RC-FROM: X-RC-RCPT: Received: (qmail 22455 invoked by uid 0); 15 Feb 2008 08:22:17 -0000 Received: from 212.114.211.6 by www106.gmx.net with HTTP; Fri, 15 Feb 2008 09:22:17 +0100 (CET) Content-Type: text/plain; charset="iso-8859-1" Date: Fri, 15 Feb 2008 09:22:17 +0100 From: Gentleman.nbg@gmx.de In-Reply-To: Message-ID: <20080215082217.261290@gmx.net> MIME-Version: 1.0 References: <20080214142959.285270@gmx.net> <20080214223117.258120@gmx.net> <20080214231112.62940@gmx.net> To: Grant Edwards X-Authenticated: #15759101 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18jX5d1rI0j9ycPuJnrxSD9j/gj1KixflUQnidqUx V3dNNiKeTYyY/0cp14Gs93+2f1k0i0d5b2SQ== Content-Transfer-Encoding: 8bit X-GMX-UID: i3KGfyRSMmA6TJYam2FnKnE5MjQ1Nx0x Resent-Message-Id: <20080215082224.DFF0865101@baal.visi.com> X-Seen-By-Grants-Procmail-Script: YES Subject: Re: Can't read with cyg_io_read() >Thank you for this hint. > >One last question: I doubt it. >I would like to set the configuration of my serial port to: >115200 baud, 1 stop-bit, no partity, word = 8bit; > >I am tring it like this but cyg_io_lookup() returns a error, do >you know if my api syntax is correct?: > >cyg_serial_info_t dcb = { CYGNUM_SERIAL_BAUD_115200, CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE, 8, 0 }; > >cyg_uint32 dcb_len = sizeof(dcb); FWIW, I don't like the parens around dcb. It makes it look like sizeof is a function or macro instead of an operator. >err = cyg_io_lookup( "/dev/haldiag" /*"/dev/tty0"*/ , &handle ); That looks OK to me. > if(ENOERR == err) > err = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO, &dcb, &dcb_len); That doesn't look OK. I always thought that hal diag drivers ran at a fixed baud and configuration. But I wasn't sure. Do you know what I just did? I _looked_at_the_source_ : Here's code from io/serial/current/src/common/haldiag.c: 126 static Cyg_ErrNo 127 haldiag_set_config(serial_channel *chan, cyg_uint32 key, const void *xbuf, 128 cyg_uint32 *len) 129 { 130 switch (key) { 131 case CYG_IO_SET_CONFIG_SERIAL_INFO: 132 diag_printf("%s\n", __FUNCTION__); 133 return ENOERR; 134 default: 135 return -EINVAL; 136 } 137 } 138 #endif // CYGPKG_IO_SERIAL_HALDIAG -- Grant Edwards grante Yow! I'm continually AMAZED at at th'breathtaking effects visi.com of WIND EROSION!! -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss