打印
[技术支持]

编译通不过

[复制链接]
4270|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
999stone999|  楼主 | 2021-11-11 16:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
程序中的这句: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
请问问题出在什么地方?

使用特权

评论回复
沙发
yangxiaor520| | 2021-11-11 20:51 | 只看该作者
没有定义指针

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

14

帖子

1

粉丝