From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30577 invoked by alias); 19 Nov 2012 17:56:30 -0000 Received: (qmail 30542 invoked by uid 22791); 19 Nov 2012 17:56:28 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.mlbassoc.com (HELO mail.chez-thomas.org) (65.100.170.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Nov 2012 17:56:13 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 1998) id 705DBF81230; Mon, 19 Nov 2012 10:56:12 -0700 (MST) Received: from [192.168.1.114] (zeus [192.168.1.114]) by mail.chez-thomas.org (Postfix) with ESMTP id 79261F8122C; Mon, 19 Nov 2012 10:56:11 -0700 (MST) Message-ID: <50AA72D4.9090209@mlbassoc.com> Date: Mon, 19 Nov 2012 17:56:00 -0000 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: Ken Yee CC: ecos-discuss@ecos.sourceware.org References: <20121119110802.31170@web007.roc2.bluetie.com> In-Reply-To: <20121119110802.31170@web007.roc2.bluetie.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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] Re: select doesn't work on stdin? X-SW-Source: 2012-11/txt/msg00009.txt.bz2 On 2012-11-19 09:08, Ken Yee wrote: > Gary Thomas wrote: >> Have you tried using a serial port (not the diagnostic console)? >> The problem with the diag port is that it is blocking which does >> not play nice with select() > > Unfortunately, we're out of serial ports on our system. We only have 3. 1 goes to a modem, 1 is used for board-board comms, and the 3rd is the console port which we have shared w/ the diag port (eCos forces you to assign the diag port to a serial port and you can't assign it to /dev/null). Not exactly true - you can use the serial driver (interrupt driven, etc) alongside the polled diag driver, at least for output. I've done it on many occasions and it works just fine. > > I can do ioctl w/ the FNONBIO flag to get it to run in non-blocking mode, but it only sees 1 in 18 characters (you hit the same key 17-18 times before one value gets to the read character function)-: > -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss