我刚开始学430在编译下面代码的时候,IAR报错
Error[Pe020]: identifier "P1REN" is undefined E:workspacemain.c 12
#include "io430.h"
#include "intrinsics.h"
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR = 0x41;
P1OUT = 0x09;
P1REN = 0x08;
while(1)
{
if(!(P1IN&0x08))
{
__delay_cycles(500000);
if(!(P1IN&0x08))
{
while(!(P1IN&0x08));
P1OUT ^= 0x41;
}
}
}
return 0;
}
各位你们看看是什么情况啊,谢谢
此帖出自
小平头技术问答
一周热门 更多>