up_flag=0; down_flag=0; }
hide_sec++; //位闪计数 if(hide_sec>3) hide_sec=0;
show_time(); //液晶显示数据
}while(count==2);break;
//count=2,调整分
case 2:do {
hide_sec=0; outkey(); Upkey(); Downkey(); if(temp>0x60) temp=0;
if(up_flag==1||down_flag==1) {
Write1302(0x8e,0x00); //写入允许 Write1302(0x82,temp); //写入新的分数 Write1302(0x8e,0x80); //禁止写入
up_flag=0; down_flag=0; }
hide_min++; if(hide_min>3) hide_min=0;
show_time();
}while(count==3);break;
//count=3,调整小时
case 3:do {
hide_min=0;
outkey(); Upkey(); Downkey();
if(up_flag==1||down_flag==1) {
Write1302(0x8e,0x00); //写入允许 Write1302(0x84,temp); //写入新的小时数 Write1302(0x8e,0x80); //禁止写入 up_flag=0; down_flag=0; }
hide_hour++; if(hide_hour>3) hide_hour=0;
show_time();
}while(count==4);break;
//count=4,调整星期
case 4:do {
hide_hour=0;
outkey(); Upkey(); Downkey();
if(up_flag==1||down_flag==1) {
Write1302(0x8e,0x00); //写入允许 Write1302(0x8a,temp); //写入新的星期数 Write1302(0x8e,0x80); //禁止写入 up_flag=0; down_flag=0; }
hide_week++; if(hide_week>3) hide_week=0;
show_time();
}while(count==5);break;
//count=5,调整日
case 5:do {
hide_week=0; outkey(); Upkey(); Downkey();
if(up_flag==1||down_flag==1) {
Write1302(0x8e,0x00); //写入允许 Write1302(0x86,temp); //写入新的日数 Write1302(0x8e,0x80); //禁止写入 up_flag=0; down_flag=0; }
hide_day++; if(hide_day>3) hide_day=0;
show_time();
}while(count==6);break;
//count=6,调整月
case 6:do
{
hide_day=0;
outkey(); Upkey(); Downkey();
if(up_flag==1||down_flag==1) {
Write1302(0x8e,0x00); //写入允许 Write1302(0x88,temp); //写入新的月数 Write1302(0x8e,0x80); //禁止写入 up_flag=0; down_flag=0; }
hide_month++; if(hide_month>3) hide_month=0;
show_time();
}while(count==7);break;
//count=7,调整年
case 7:do {
hide_month=0;
outkey();