CC2530————T1定时器(自由计数模式)实现PWM(呼吸灯)宏定义初始化主函数
#include<iocc2530.h>#define uint unsigned int#define uchar unsigned char#define LED1 P1_0uchar h = 1;void InitLED(void){P1SEL &=~0X01;P1DIR |=0X01;LED1 =0;}void InitT1(void){T1CTL |= 0X01;//一分频,自由计数模式,2-3为分频,0-1为计数模式PERCFG = 0X4