[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Extremly confusing behaviour... (more detailedexplana
From: |
Mike Panetta |
Subject: |
Re: [avr-gcc-list] Extremly confusing behaviour... (more detailedexplanation of error, believe me its not a volatile thing) |
Date: |
14 May 2003 13:46:04 -0400 |
Actually its returning an int32_t. Here is the function declaration for
your refrence:
int32_t srf08_read(uint8_t address, uint8_t reg, uint8_t *data, int32_t
len);
I guess you could say thats a string of bytes, but I would expect the
compiler to treat an int32_t as a 32bit quantity when I am using it in a
comparison... The LSB of the value is definately correct (I am writing
it to PORTB), and in srf08_read I have a printf just before it returns
that prints the value. It prints what I expect it to.
Mike
On Wed, 2003-05-14 at 13:13, Larry Barello wrote:
> Well, clearly srf08_read() is NOT returning 2 when reading the data! It is
> returning a
> series of bytes of which only ONE is the true return value.
>
> Casting the return value to an byte clips off the higher bytes (which are
> bogus anyway,
> right?)
>
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), (continued)
- Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?), Joerg Wunsch, 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... (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 <=
- 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, 2003/05/14
- 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