I’m trying to port some code from a Windows device driver to NET+OS. I have several structures that map to registers, per the following sample:
//////////////////////////////////////////////////////////////////////
typedef struct
{
unsigned char _1 : 1;
unsigned char _2 : 1;
unsigned char _3 : 1;
unsigned char _4 : 1;
unsigned char _5 : 1;
unsigned char _6 : 1;
unsigned char _7 : 1;
unsigned char _8 : 1;
}
attribute((packed))
attribute((ms_struct))
STRUCT_1;
STRUCT_1 s_1;
memset (&s_1, 0, sizeof (s_1));
s_1._1 = 1;
UCHAR * p = &s_1;
//////////////////////////////////////////////////////////////////////
Here’s my problem:
// * p == 0x80 // NET+OS
// * p == 0x01 // Windows
When I compile the code above, the compiler tells me:
‘ms_struct’ attribute directive ignored
Does anyone know how to enable it?