On Tue, 11 Jun 2002, Simon Hosie wrote:
>Is there any way that I can allocate whole bytes in bit addressable
>memory, and then access individual bits within it? Like a char/bitfield
>union, but using the processor's "special powers" rather than faking it.
>IAR offers the bdata storage class, and the individual bits of "bdata
>char c" are accessible as "c.0", "c.1", etc..
you can do it like this using fixed addresses.
unsigned char at 0x2f bits;
bit at 120 led;
bit at 121 reset5;
bit at 122 xtal;
bit at 123 p32;
bit at 127 p33;
bit at 126 p34;
bit at 125 p35;
bit at 124 p37;
Make sure that the automatic generated vars and the stack dont crash
your fixed vars.