From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 460 invoked by alias); 22 Apr 2005 08:53:33 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 32331 invoked from network); 22 Apr 2005 08:52:24 -0000 Received: from unknown (HELO web1.ulb.ac.be) (164.15.59.200) by sourceware.org with SMTP; 22 Apr 2005 08:52:24 -0000 Received: from wwwdev.ulb.ac.be (resu1 [164.15.59.200]) by web1.ulb.ac.be (8.8.8/3.17.1.ap (resu)) id KAA07995; Fri, 22 Apr 2005 10:52:23 +0200 (MEST) for ecos-discuss@sources.redhat.com Date: Fri, 22 Apr 2005 09:20:00 -0000 Message-Id: <200504220852.KAA07995@web1.ulb.ac.be> From: Gatien Gillon To: ecos-discuss@sources.redhat.com X-sender-IP: 164.15.75.35 Subject: re:Re: [ECOS] Serial Port in non-blocking mode X-SW-Source: 2005-04/txt/msg00230.txt.bz2 I'm getting 0x0 instead of the caracter ... *z = 0x0 when I put a breakpoint on the "if( *z >= 'A' && *z <= 'z' )" (see lower) In my main I have : cyg_io_set_config(ser_handle, 0x1081, &zero, &l32); while(1) { t+=dt; if(t>=900) dt = -step; if(t<=100) dt = step; HAL_WRITE_UINT16 (0xFFFAC008, t); // write DAC readch(); /*if(var1) printf("var 1 : %d\n", var1);*/ } void readch() { int i; cyg_io_read( ser_handle, z, &l ); if( *z >= 'A' && *z <= 'z' ) { printf(z); line[cnt] = *z; cyg_io_write( ser_handle, z, &l ); if(cnt<10) cnt++; if(*z == '\n') exec=1; if(exec) { exec = 0; exec_cmd(line); cnt = 1; } } } I'm getting 0x0 instead of the caracter ... *z = 0x0 when I put a breakpoint on the "if( *z >= 'A' && *z <= 'z' )" > >----- Original Message ----- >From: "Andrew Lunn" >To: "Gatien Gillon" >Cc: >Sent: Thursday, April 21, 2005 5:39 PM >Subject: Re: [ECOS] Serial Port in non-blocking mode > > >> On Thu, Apr 21, 2005 at 05:02:09PM +0200, Gatien Gillon wrote: >>> I'm trying to make my AT91EB55 board communicate with a PC, when using >>> the >>> cyg_io_read function the program waits for an input wich is not what i >>> want. In non blocking mode I keep on getting 0x0's when reading the port >>> even if I have sended some characters. >> >> Are you getting 0x0 as well as, or instead of? >> >> 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 > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss