On Thu, Apr 30, 2009 at 15:45, JMGross <[email protected]> wrote:
>
> As we can see, the compiler directly calculates the result of 255*3 to -3 
> (0xfffd). And here is the problem. Somehow the 255 gets interpreted as -1 
> signed 8-bit instead of 255 unsigned 16 bit.

Wild guess: what happens if you change the define to:

#define PRR_SCALE ((uint8_t) 255)

or add a cast in the expression?

Conrado

Reply via email to