|
Re: p1_sw_aux data type
p1_sw_aux1 is really a macro
#define p1_sw_aux1 rxdata.oi_swA_byte.bitselect.bit2 // Aux input
bitselect is a member of a union and is of defined type 'bitid'
typedef struct
{
unsigned int bit0:1;
unsigned int bit1:1;
unsigned int bit2:1;
unsigned int bit3:1;
unsigned int bit4:1;
unsigned int bit5:1;
unsigned int bit6:1;
unsigned int bit7:1;
} bitid;
Thus, the 'type' of bit2 is a single bit, the value is always 0 or 1.
HTH
|