On Sunday 04 March 2007 14:21, Gavin Jackson wrote:
> Another thing you may want to take a look at is the SPIF
> flag on page 174 of the datasheet. It states that:

> >From what the datasheet says, your SPIF bit is never cleared
> so you'll be overwriting the SPI data register contents before
> they've been transmitted.

That code was copy&pasted verbatim right out of the CAN128
data sheet, I would not normally write code in that style.  I was
doing a test on some hardware for a new board that I just powered
up for the first time and was looking for something quick.  I should know better
than to trust Atmel supplied code.  Sometimes I wonder
if they even bother to compile it; such as their old battery charger code
when you use something besides a Lithium battery for example.

Thanks for bring that to my attention.






_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to