程序中的这句:INTEDG = 0;编译报错:---------------- Project: test_program_V01 ----------------
compiling inital.c...
compiling main.c...
main.c:81: error 20: Undefined identifier 'OPTIONbits'
main.c:81: error 25: Structure/Union expected left of '.->'
"test_program_V01" - 2 Error(s), 0 Warning(s).
2021-11-11 16:27:42 Build fail.
HC16P015B0的库文件有声明:
#define OPTION_ADDR 0x0041
//==============================================================================
// OPTION Bits
extern __at(0x0041) __sfr OPTION;
typedef struct
{
unsigned PS0 : 1;
unsigned PS1 : 1;
unsigned PS2 : 1;
unsigned PSA : 1;
unsigned T0SE : 1;
unsigned T0CS : 1;
unsigned INTEDG : 1;
unsigned : 1;
} __OPTIONbits_t;
extern __at(0x0041) volatile __OPTIONbits_t OPTIONbits;
#define _PS0 0x01
#define _PS1 0x02
#define _PS2 0x04
#define _PSA 0x08
#define _T0SE 0x10
#define _T0CS 0x20
#define _INTEDG 0x40
请问问题出在什么地方?
|