|
求助啊,用IAR练习彩灯控制,但是不能调用库函数
[复制链接]
调用不了430f249的库函数,一调用就是100个error
这是程序,一编译就会跳出一个新窗口,然后一堆error
#include
#include "io430.h"
#define uchar unsigned char
#define uint unsigned int
void delay(uint t)
{
uint i;
while(t--)
for(i=1300; i>0; i--);
}
void main( void )
{
uint mask = 0x01;
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR = 0xff;
P1SEL = 0x00;
P1OUT = 0xff;
while(1)
{
if((P2IN & 0x07) == 0x06)
{
P1OUT ^=(BIT0 + BIT4);
delay(100);
}
else if((P2IN & 0x07) == 0x05)
{
P1OUT ^=(BIT1 + BIT5);
delay(200);
}
else if((P2IN & 0x07) == 0x03)
{
P1OUT = ~mask;
delay(100);
mask += mask;
if(mask == 0x100)
mask == 0x01;
}
if((P2IN & 0x07) == 0x07)
P1OUT = 0xff;
}
}
|
|