avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Time-efficient read of high byte in two-byte variable


From: E. Weddington
Subject: Re: [avr-gcc-list] Time-efficient read of high byte in two-byte variable
Date: Thu, 08 May 2003 17:22:14 -0600

On 8 May 2003 at 15:59, Wallace White wrote:

> E. Weddington wrote:

<snip> 

> That indeed works well. Cool.
> 
> Let's see, my variable in question is a signed int... so I could
> change the typedef union
> 
>  typedef union
>  {
>   int16_t word;
>   hilow_t byte;
>  } mytype ;
> 
> and tack on .word to all my references to that variable... that should
> be fine, right?
> 
> Thanks,
> Wallace
> 

Hmm. Well it's up to you as to how you want to handle the signed 
issue. Do you want the high byte to be signed? or unsigned? Do you 
want the low byte to be signed as well?

Eric


reply via email to

[Prev in Thread] Current Thread [Next in Thread]