typedef enum //PRO_Status
{
SHOW_PERIOD = 0,
SHOW_DUTY,
SHOW_SET_PERIOD,
SHOW_SET_DUTY,
SET_PERIOD,
SET_DUTY
}PRO_STATUS;
PRO_STATUS g_status=SHOW_PERIOD;
UINT16 g_period=40,g_duty=20; //初始周期40,占空比20
UINT16 g_set_period=40,g_set_duty=20;
int g_led_cnt=0,g_led_flag=0,g_btn_cnt=0,g_btn_flag=0,flag=0;
//显示于按键标志,用于周期性定时处理LED显示和按键
unsigned char Led_lib[] = {
0x42, 0xf3, 0x86, 0xa2, 0x33, 0x2a, 0x0a, 0xf2, 0x02, 0x22, //0-9
0x40, 0xf1, 0x84, 0xa0, 0x31, 0x28, 0x08, 0xf0, 0x00, 0x20, //0.-9.
0x1e, 0x2a, 0x0e, 0x0f, 0xbf, 0x23, 0x9b, 0x8b}; //FSEt-yno
|