public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* re:Re: [ECOS] Serial Port in non-blocking mode
@ 2005-04-22  9:20 Gatien Gillon
  2005-04-22 21:47 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Gatien Gillon @ 2005-04-22  9:20 UTC (permalink / raw)
  To: ecos-discuss

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" <andrew@lunn.ch>
>To: "Gatien Gillon" <ggillon@ulb.ac.be>
>Cc: <ecos-discuss@sources.redhat.com>
>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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-22 21:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-22  9:20 re:Re: [ECOS] Serial Port in non-blocking mode Gatien Gillon
2005-04-22 21:47 ` Andrew Lunn
2005-04-23  0:21   ` [ECOS] i386 'make' problem Gonçalo Antunes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).