Kinda on a similair topic, how can you create a single-bit variable - kinda like a bool - using c?
This whitepaper says you can use individual bits like so:
Code:
struct bits {
unsigned int itsy: 3; // Use 3 bits as the variable ?itsy?
unsigned int bitsy: 3; // Use 3 bits as the variable ?bitsy?
unsigned int teensy: 1; // Use 1 bit as the variable ?teensy?
unsigned int weensey:1 // Use 1 bit at the variable ?weensy?
};
but the "itsey: 3;" syntax doesn't seem to work unless you are using it inside a struct. I'm sure there's a way more elegant than using a struct, but can anyone let me know what it is?