From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 697 invoked by alias); 18 Oct 2004 09:20:18 -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 670 invoked from network); 18 Oct 2004 09:20:15 -0000 Message-ID: <002f01c4b4f3$fdfdae50$110110ac@Msicheri> Reply-To: "Sicheri Marco" From: "Sicheri Marco" To: "eCos Dev.List" , "eCos Discus.List" References: <010901c4ad48$b4ca3da0$110110ac@Msicheri> <20041008151913.GI28515@lunn.ch> <011601c4ad4b$573e9c50$110110ac@Msicheri> Subject: Re: [ECOS] io_read Date: Mon, 18 Oct 2004 09:20:00 -0000 Organization: CTS electronics MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2004-10/txt/msg00033.txt.bz2 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? Thanks and good work! Ossequi, (Best Regards/Obrigado) Marco SICHERI CTS electronics - R&D Department phone: +39 0125 235637, +39 0125 235630 e-mail: m.sicheri@ctsgroup.it http://www.ctsgroup.it ----- Original Message ----- From: "Sicheri Marco" To: "eCos Discus.List" Sent: Friday, October 08, 2004 5:27 PM Subject: Re: [ECOS] io_read > Thanks Andrew, I had think to use the cyg_io_select (like uclinux) but I > don't found the cyg_io_select() doc. man cyg_io_select don't do....:o( > Please, (you are the angel) can you have the doc of this function? ^_* > If i don't read you email today: Good weekend!! > > Ossequi, (Best Regards/Obrigado) > Marco SICHERI > CTS electronics - R&D Department > phone: +39 0125 235637, +39 0125 235630 > e-mail: m.sicheri@ctsgroup.it > http://www.ctsgroup.it > > > ----- Original Message ----- > From: "Andrew Lunn" > To: "Sicheri Marco" > Cc: "eCos Discus.List" > Sent: Friday, October 08, 2004 5:19 PM > Subject: Re: [ECOS] io_read > > > > On Fri, Oct 08, 2004 at 05:08:43PM +0200, Sicheri Marco wrote: > > > Hi All, > > > > > > the cyg_io_read function don't return until it don't 'read' a data. > > > How can I return after timeout? Or, How can I know if a data is in my > io? > > > > You can use cyg_io_select() to see if there is anything availabe on > > the handle. > > > > 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 > > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss