⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timer.lst

📁 lcd驱动程序:用于au
💻 LST
📖 第 1 页 / 共 4 页
字号:
 229   3                              write_timer(&curr_time);
 230   3                              curr_time.hour=0, curr_time.minute=0;
 231   3                              read_timer(&curr_time);//zl.d
 232   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
 233   3                              write_timer(&curr_time);
 234   3                              curr_time.hour=0, curr_time.minute=0;
 235   3                              read_timer(&curr_time);//zl.d
 236   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
 237   3                              write_timer(&curr_time);
 238   3                              curr_time.hour=0, curr_time.minute=0;
 239   3                              read_timer(&curr_time);//zl.d
 240   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 5   

 241   3                              write_timer(&curr_time);
 242   3                              curr_time.hour=0, curr_time.minute=0;
 243   3                              read_timer(&curr_time);//zl.d
 244   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
 245   3                              write_timer(&curr_time);
 246   3                              curr_time.hour=0, curr_time.minute=0;
 247   3                              read_timer(&curr_time);//zl.d
 248   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
 249   3                              write_timer(&curr_time);
 250   3                              read_timer(&curr_time);//zl.d
 251   3      
 252   3                      */
 253   3      
 254   3                              
 255   3                              read_timer(0x01,&curr_time);//zl.d
 256   3      
 257   3                              init_timer_menu();
 258   3                              osd_clear(0xd0);osd_clear(0xdd);
 259   3                              //===load time from timer.===================
 260   3                              
 261   3                              
 262   3                              current_time_menu(curr_time.hour, curr_time.minute,curr_time.second);
 263   3                              //===load time from EEPROM .================
 264   3                              shi_sub_read(EEPROM, 0x20, 0, &on_time.hour);
 265   3                              shi_sub_read(EEPROM, 0x21, 0, &on_time.minute);
 266   3                              shi_sub_read(EEPROM, 0x22, 0, &off_time.hour);
 267   3                              shi_sub_read(EEPROM, 0x23, 0, &off_time.minute);
 268   3                              shi_sub_read(EEPROM, 0x24, 0, &timer_able_flag);
 269   3                              on_time_menu(on_time.hour,on_time.minute);
 270   3                              off_time_menu(off_time.hour,off_time.minute);
 271   3                              able_time_menu(timer_able_flag);
 272   3                              //===================================
 273   3                              timeshow_flag=1;
 274   3                              osd_hbsection(content,hl,0x13,0x14,0x02,0x02);
 275   3                              osd_color(content,background,highlight,Yellow);
 276   3                      }
 277   2                      //=====load timer value on time.
 278   2                      
 279   2              }
 280   1      /////////////////////////////////////////////////////////////////zl.d
 281   1              if(timemenu_flag)
 282   1                      {
 283   2                              ++Timer_numer;
 284   2                              while(Timer_numer>10)
 285   2                                      {
 286   3                                              read_timer(0x01,&curr_time);//zl.d
 287   3      
 288   3                                              current_time_menu(curr_time.hour, curr_time.minute,curr_time.second);
 289   3                                              Timer_numer=0;
 290   3                                      }
 291   2      
 292   2                      
 293   2                      }
 294   1      ////////////////////////////////////////////////////////////////////
 295   1              
 296   1              if(timemenu_flag&&(irdown_flag||irup_flag))
 297   1              {
 298   2                      osd_timer=0;
 299   2                      if(irup_flag){
 300   3                              irup_flag=0;
 301   3                              time_sel--;
 302   3                              if(time_sel==0){
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 6   

 303   4                                      osd_timer=0;                            
 304   4                                      DelayXms(0xff);osd_timer=0;DelayXms(0xff); osd_timer=0;
 305   4                                      osd_show(00, 11, &NULLC);
 306   4                                      //osd_show(0xd0, 0x10, &NULLC);osd_show(0xe0, 0x10, &NULLC);osd_show(0xf0, 0x08, &NULLC);
 307   4                                      osd_clear(0x30);osd_clear(0x40);osd_clear(0x50);osd_clear(0x30);osd_clear(0x60);
 308   4                                      osd_clear(0x70);osd_clear(0x80);osd_clear(0x90);osd_clear(0xa0);osd_clear(0xb0);
 309   4                                      osd_clear(0xc0);osd_clear(0xd0);osd_clear(0xe0);osd_clear(0xf0);
 310   4                                      if(mute_flag){
 311   5                                              osd_size(content, 0, 0);
 312   5                                      }
 313   4                                      irup_flag=1;topmenu_flag=1;osd_timer=0;TR0=1;
 314   4                                      time_sel=1;     
 315   4                                      
 316   4                                 timemenu_flag=0;
 317   4                                      timeshow_flag=0;
 318   4       
 319   4                                      inittopmenu();
 320   4                                 initsubmenu1();
 321   4                                 Submenu1(britc_sel);
 322   4      
 323   4                                      osd_timer=0; 
 324   4                                      osd_switch(7);
 325   4                              }
 326   3                      }
 327   2                      else if(irdown_flag){
 328   3                              irdown_flag=0;
 329   3                              time_sel++;
 330   3                              if(time_sel==10){time_sel=9;}
 331   3                      }
 332   2                      #if _debug
 333   2                      //printf("time_sel=%bx\n",time_sel);
 334   2                      #endif
 335   2                      osd_timer=0;
 336   2                      switch(time_sel){
 337   3                              case 1:
 338   3                                      osd_hbsection(content,hl,0x13,0x14,0x02,0x02);
 339   3                                      osd_color(content,background,highlight,Yellow);
 340   3                                      osd_timer=0;
 341   3                                      break;
 342   3                              case 2:
 343   3                                      osd_hbsection(content,hl,0x16,0x17,0x02,0x02);
 344   3                                      osd_color(content,background,highlight,Yellow);
 345   3                                      osd_timer=0;
 346   3                                      break;
 347   3                              case 3:
 348   3                                      osd_hbsection(content,hl,0x13,0x14,0x03,0x03);
 349   3                                      osd_color(content,background,highlight,Yellow);
 350   3                                      break;
 351   3                              case 4:
 352   3                                      osd_hbsection(content,hl,0x16,0x17,0x03,0x03);
 353   3                                      osd_color(content,background,highlight,Yellow);
 354   3                                      osd_timer=0;
 355   3                                      break;
 356   3                              case 5:
 357   3                                      osd_hbsection(content,hl,0x1a,0x20,0x03,0x03);
 358   3                                      osd_color(content,background,highlight,Yellow);
 359   3                                      osd_timer=0;
 360   3                                      break;
 361   3                              case 6:
 362   3                                      osd_hbsection(content,hl,0x13,0x14,0x04,0x04);
 363   3                                      osd_color(content,background,highlight,Yellow);
 364   3                                      osd_timer=0;
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 7   

 365   3                                      break;
 366   3                              case 7:
 367   3                                      osd_hbsection(content,hl,0x16,0x17,0x04,0x04);
 368   3                                      osd_color(content,background,highlight,Yellow);
 369   3                                      osd_timer=0;
 370   3                                      break;
 371   3                              case 8:
 372   3                                      osd_hbsection(content,hl,0x1a,0x20,0x04,0x04);
 373   3                                      osd_color(content,background,highlight,Yellow);
 374   3                                      osd_timer=0;
 375   3                                      break;
 376   3                              case 9:
 377   3                                      osd_hbsection(content,hl,0x00,0x04,0x05,0x05);
 378   3                                      osd_color(content,background,highlight,Yellow);
 379   3                                      osd_timer=0;
 380   3                                      
 381   3                                      DelayXms(0xff);osd_timer=0;DelayXms(0xff); osd_timer=0;
 382   3                                      osd_show(00, 11, &NULLC);
 383   3                                      //osd_show(0xd0, 0x10, &NULLC);osd_show(0xe0, 0x10, &NULLC);osd_show(0xf0, 0x08, &NULLC);
 384   3                                      osd_clear(0x30);osd_clear(0x40);osd_clear(0x50);osd_clear(0x30);osd_clear(0x60);
 385   3                                      osd_clear(0x70);osd_clear(0x80);osd_clear(0x90);osd_clear(0xa0);osd_clear(0xb0);
 386   3                                      osd_clear(0xc0);osd_clear(0xd0);osd_clear(0xe0);osd_clear(0xf0);
 387   3                                      if(mute_flag){
 388   4                                              osd_size(content, 0, 0);
 389   4                                              }
 390   3                                      top_sel=7;
 391   3                                      time_sel=1;
 392   3                                      topmenu_flag=1;
 393   3                                 britmenu_flag  = 0;
 394   3                                      
 395   3                                 timemenu_flag=0;
 396   3                                      timeshow_flag=0;
 397   3                                 volshow_flag = 0;
 398   3                                      exit_flag=0;
 399   3                                      
 400   3                                      inittopmenu();
 401   3                                      osd_hbsection(content,hl,0x01,0x10,0x07,0x07);
 402   3                                      osd_color(content,background,highlight,Yellow);
 403   3                                      osd_timer=0;
 404   3                                      TR0=1;
 405   3                                      osd_switch(7); 
 406   3                                      break;                          
 407   3                              default:
 408   3                                      osd_timer=0;
 409   3                                      break;
 410   3                      }
 411   2                      osd_timer=0;
 412   2              }
 413   1      
 414   1              if(timemenu_flag&&irleft_flag){
 415   2                      irleft_flag=0;
 416   2                      switch (time_sel){
 417   3                              case 1:
 418   3                                      read_timer(0x01,&curr_time);
 419   3                                      if(curr_time.hour==0){
 420   4                                              curr_time.hour=24;
 421   4                                              }
 422   3                                      
 423   3                                      curr_time.hour--;
 424   3                                      //printf("curr_time.minute%bx",curr_time.minute);
 425   3                                      current_time_menu(curr_time.hour, curr_time.minute,curr_time.second);
 426   3                                      
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 8   

 427   3                                      //temp[0]=curr_time.hour;
 428   3                                      
 429   3                                      //curr_time.hour=temp[0];
 430   3                                      write_timer(0x01,&curr_time);
 431   3                                      
 432   3                                      
 433   3                                      
 434   3                                      //shi_sub_read1(0x66, 0x02, &temp);
 435   3                                      //printf("temp%bx\n",temp[1]);
 436   3                                      //shi_sub_write1(0x66, 0x00, &curr_time.hour);
 437   3                                      //write to timer chip
 438   3                                      
 439   3                                      break;
 440   3                              case 2:
 441   3                                      read_timer(0x01,&curr_time);
 442   3                                      if(curr_time.minute==0){
 443   4                                              curr_time.minute=60;
 444   4                                              }
 445   3                                      
 446   3                                      curr_time.minute--;
 447   3                                      current_time_menu(curr_time.hour, curr_time.minute,curr_time.second);
 448   3                                      //write to timer chip
 449   3                                      
 450   3                                      //temp[1]=curr_time.minute;
 451   3                                      //read_timer(&curr_time);
 452   3                                      //curr_time.minute=temp[1];
 453   3                                      write_timer(0x01,&curr_time);
 454   3                                      break;
 455   3                              case 3:
 456   3                                      //on_time.hour=12;on_time.minute=4;
 457   3                                      //temp[0]=1;temp[2]=2;temp[3]=3;
 458   3                                      //shi_sub_write1(0x68, 0x02, &temp);
 459   3                                      //write_timer(0x02, &on_time);
 460   3                                      //shi_sub_read1(0x68, 0x02,&temp);
 461   3                                      //printf("w%bxh%bx%m%bx",temp[0],temp[1],temp[2]);
 462   3                                      read_timer(0x02,&on_time);
 463   3                                      if(on_time.hour==0){
 464   4                                              on_time.hour=24;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -