[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Extremly confusing behaviour... (more detailed explan
From: |
Mike Panetta |
Subject: |
Re: [avr-gcc-list] Extremly confusing behaviour... (more detailed explanation of error, believe me its not a volatile thing) |
Date: |
14 May 2003 13:42:24 -0400 |
Yeah, I thought that would fix it too. It does not :( So far the only
thing that has any reproduceable effect is either print the variable
out, or cast it to int8_t. It still boggles me as to why I get the
correct value back if I write it to the IO port, but the while is
seemingly ignoring it.
Mike
On Wed, 2003-05-14 at 13:13, E. Weddington wrote:
> On 14 May 2003 at 13:23, Mike Panetta wrote:
>
> <snip>
> > Now here is the weird part. If I change the code to this:
> >
> > do
> > {
> > delay = 1000;
> > while (delay--);
> > PORTA |= _BV (PA1);
> > retval = srf08_read(1, 0, pingdata, 2);
> > PORTA &= ~(_BV(PA1));
> > PORTB = retval;
> > //printf("%ld ", retval);
> > } while ((int8_t)retval != 2); <-------------- Change made
> > } here
> >
> > Then the code works perfectly!!!!
> >
>
> What do you get when you do this?:
>
> } while(retval != 2L);
>
> Eric
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), (continued)
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), Keith Gudger, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), Mike Panetta, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspectcompiler?, optimization error?), Larry Barello, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspectcompiler?, optimization error?), Mike Panetta, 2003/05/14
- RE: [avr-gcc-list] Extremely confusing behaviour... (Suspectcompiler?,optimization error?), Ralph Mason, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), Joerg Wunsch, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailed explanation of error, believe me its not a volatile thing), Mike Panetta, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailedexplanation of error, believe me its not a volatile thing), Larry Barello, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailedexplanation of error, believe me its not a volatile thing), Mike Panetta, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailed explanation of error, believe me its not a volatile thing), E. Weddington, 2003/05/14
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailed explanation of error, believe me its not a volatile thing),
Mike Panetta <=
- Re: [avr-gcc-list] Extremly confusing behaviour... (more detailedexplanation of error, believe me its not a volatile thing), David Brown, 2003/05/16
Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), E. Weddington, 2003/05/14
Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), Denis Chertykov, 2003/05/14