cc2540里有没有一些针对io的接口,在哪里?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
简单的程序!中断闪灯!
#include "ioCC2540.h"
void delay(void)
{unsigned long i;
for(i=0;i<100000;i++)
asm(" nop ");
}
#pragma vector = P1INT_VECTOR
__interrupt void P1INT_ISR(void)
{P1IFG=0;
P1IF=0;
P0=0;
delay();
delay();
delay();
P0=0xff;
delay();
delay();
delay();
}
void main()
{
P0SEL =0;
P1SEL =0x0;
P0DIR=0xff;
P1DIR=0x02;
PICTL = 0x02;
P1IEN=0x0c;
IEN2=0x10;
EA=1;
while(1)
{
}
}