From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9801 invoked by alias); 18 Oct 2004 09:36:34 -0000 Mailing-List: contact ecos-devel-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@sources.redhat.com Received: (qmail 9779 invoked from network); 18 Oct 2004 09:36:32 -0000 Date: Mon, 18 Oct 2004 09:36:00 -0000 To: Sicheri Marco Cc: "eCos Dev.List" Subject: Re: [ECOS] io_read Message-ID: <20041018093607.GU2141@lunn.ch> References: <010901c4ad48$b4ca3da0$110110ac@Msicheri> <20041008151913.GI28515@lunn.ch> <011601c4ad4b$573e9c50$110110ac@Msicheri> <002f01c4b4f3$fdfdae50$110110ac@Msicheri> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002f01c4b4f3$fdfdae50$110110ac@Msicheri> User-Agent: Mutt/1.5.6+20040907i From: Andrew Lunn X-SW-Source: 2004-10/txt/msg00034.txt.bz2 On Mon, Oct 18, 2004 at 11:22:30AM +0200, Sicheri Marco wrote: > Hi, > I resolve my problem, I read the source. Thanks! > This is my code: > if (cyg_io_select(ctsUartHandle[uartID], CYG_FREAD, uartInfo) == false) > return (CPSRC_UART_NOTREADY); > else > { > uartBufLen = 1; > err = cyg_io_read(ctsUartHandle[uartID], &uartChar, &uartBufLen); > ... > } > Thank all for yours answer. > > But: > I can use the read() or the cyg_io_read()... > Which do you recommend to use? read() or cyg_io_read()? Or are they alike > right? The advantage of using read() and select() etc is that they are POSIX. So if you need to port to code some some other RTOS it should be much easier. Andrew