- 打卡等级:以坛为家I
- 打卡总天数:348
- 最近打卡:2026-06-09 08:04:25
已绑定手机
金牌会员
- 积分
- 1458
|
发表于 2026-5-14 11:07:36
|
显示全部楼层
//LED流水灯处理函数
void Led_Proc()
{
static u8 cnt = 0xFE;
if(System_Cnt>=500)
{
System_Cnt = 0;
switch(Led_Mode)
{
case 0:
cnt = _crol_(cnt,1);
P2 = cnt;
break;
case 1:
cnt = _cror_(cnt,1);
P2 = cnt;
break;
case 2:
Led_Dat_Index++;
if(Led_Dat_Index >= 4)Led_Dat_Index = 0;
P2 = Led_Dat[Led_Dat_Index];
break;
case 3:
Led_Dat_Index--;
if(Led_Dat_Index ==255)Led_Dat_Index = 3;
P2 = Led_Dat[Led_Dat_Index];
break;
}
}
} |
|