|
From: | E. Weddington |
Subject: | Re: [avr-libc-dev] RFC: avr/bits.h |
Date: | Tue, 01 Mar 2005 14:35:06 -0700 |
User-agent: | Mozilla Thunderbird 0.7.3 (Windows/20040803) |
Nicolas Schodet wrote:
No, the warning is already included in the datasheet for those items, specifically the TWI subsystem.Hello, About bit manipulations, I had a bad experience last week. On some registers, bit manipulation can be tricky: TWCR &= ~(_BV (TWSTA) | _BV (TWSTO)); The interrupt flag bit is read as 1, and writen at 1, this clear the interrupt bit! A warning could be added to the manual.
Another question about bit manipulation: what is the best way to read 4bytes into a double word?
Use a union. This has been discussed before. See the archives.
This could also be included in the bit manipulation header.
No it shouldn't. It has nothing to do with bit manipulation. Eric
[Prev in Thread] | Current Thread | [Next in Thread] |