Posted on May 17, 2011 at 13:08
Hi all;
Thanks for your advices. I solved my problem! (I'm using IAR)
I tried to use the two methods proposed by andreas1 and janek. The two methods work as I want. But I think using union is an elegant way to solve t...
Posted on May 17, 2011 at 13:08I used this method before (PCW a compiler for Microchip microcontrollers) and it worked fine!! I want to fill all the fields of the structure and send it via SPI (8 bits). How can I use the variable REG (with type REG_...
Posted on May 17, 2011 at 13:08
Hi guys;
My question is purely software.
I want to define a structure of bit fields of a variable to minimize the use of masks.
Example :
typedef struct _reg_struct
{
vu8 field1 : 1;
vu8 field2 : 1;
vu8 field3 ...