quarry (02.12.2011 18:11 - 18:15, просмотров: 124) ответил rezident на Там не enum, а битовая структура.
одно другому не мешает, надо попробовать сделать типа так __no_init volatile union
{
unsigned short CBCTL1; /* Comparator B Control Register 1 */
struct
{
unsigned short CBOUT : 1; /* Comp. B Output */
unsigned short CBOUTPOL : 1; /* Comp. B Output Polarity */
unsigned short CBF : 1; /* Comp. B Enable Output Filter */
unsigned short CBIES : 1; /* Comp. B Interrupt Edge Select */
unsigned short CBSHORT : 1; /* Comp. B Input Short */
unsigned short CBEX : 1; /* Comp. B Exchange Inputs */
unsigned short CBFDLY0 : 1; /* Comp. B Filter delay Bit 0 */
unsigned short CBFDLY1 : 1; /* Comp. B Filter delay Bit 1 */
unsigned short CBPWRMD0 : 1; /* Comp. B Power Mode Bit 0 */
unsigned short CBPWRMD1 : 1; /* Comp. B Power Mode Bit 1 */
unsigned short CBON : 1; /* Comp. B enable */
unsigned short CBMRVL : 1; /* Comp. B CBMRV Level */
unsigned short CBMRVS : 1; /* Comp. B Output selects between VREF0 or VREF */
} CBCTL1_bit;
} @ 0x08C2;
enum {
CBOUT = 0x0001,
CBOUTPOL = 0x0002,
CBF = 0x0004,
CBIES = 0x0008,
CBSHORT = 0x0010,
CBEX = 0x0020,
CBFDLY0 = 0x0040,
CBFDLY1 = 0x0080,
CBPWRMD0 = 0x0100,
CBPWRMD1 = 0x0200,
CBON = 0x0400,
CBMRVL = 0x0800,
CBMRVS = 0x1000,
};