命令行测试软件
TTYS1/zigbee硬件&SOC视频

#define LED5 P1_4
#define LED6 P1_5
#define LED7 P1_6
#define LED8 P1_7
void main(void)
{
P1DIR|=OxF0;
P1SEL&=~0xF0; while(1)
{
LED5^=1;
LED6^=1;
LED7^=1;
LED8^=1;
delay();
}
} void SET_MAIN_CLOCK_SOURCE(source)
{
if(source)
{
CLKCON|=0x40;
while(!RC_OSC_STABLE);
if(TICKSPD==0)
{
CLKCON|=0x08;
}
SLEEP|=0x04;
}
else
{
SLEEP&=~0x04;
while(!X0SC_STABLE);
asm("NOP");
CLKCON&=~0x47;
SLEEP|=0x4;
}
}