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

📄 ir.lst

📁 lcd驱动程序:用于au
💻 LST
📖 第 1 页 / 共 2 页
字号:
 235   6                                                              }
 236   5                                                              else{
 237   6                                                                      osd_show(0x28, 1, &NULLC) ;
 238   6                                                                      load_audio_volume();
 239   6                                                                      #if _debug
 240   6                                                                      printf("load_audio_volume.\n");
 241   6                                                                      #endif
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 5   

 242   6                                                                      
 243   6                                                              }
 244   5                                                      }
 245   4                                                      osd_timer=0;TR0=1;
 246   4                                                      break;
 247   4                                      case irkey_source:      // Inp_sel Button
 248   4                                              osd_timer=0;TR0=1;
 249   4                                                      if (power_flag){
 250   5                                                              irsource_flag= 1;       // IR Inp_sel Button Active
 251   5                                              }
 252   4                                                      osd_timer=0;TR0=1;
 253   4                                      break;
 254   4                                      case irkey_menu:        // Menu Button
 255   4                                              osd_timer=0;TR0=1;
 256   4                                                                      
 257   4                                              #if _debug
 258   4                                              printf("the key is menu.\n");
 259   4                                              #endif
 260   4                                              
 261   4                                              if (power_flag){
 262   5                                                              irmenu_flag = 1;        // IR Menu Button Active
 263   5                                              }
 264   4                                                      osd_timer=0;TR0=1;
 265   4                                              break;
 266   4                              //---------------up down left right -------------------
 267   4                                      case irkey_up:  // Menu+ Button
 268   4                                              osd_timer=0;TR0=1;
 269   4      
 270   4                                              #if _debug
 271   4                                              printf("the key is up.\n");
 272   4                                              #endif
 273   4                                              
 274   4      
 275   4                                                      if (power_flag){
 276   5                                                              irup_flag = 1;  // IR Menu+ Button Active
 277   5                                              }
 278   4                                                      osd_timer=0;TR0=1;
 279   4                                              break;
 280   4                                      case irkey_down:        // Menu- Button
 281   4                                              osd_timer=0;TR0=1;
 282   4                                              #if _debug
 283   4                                              printf("the key is down.\n");
 284   4                                              #endif
 285   4                                              
 286   4      
 287   4                                              if (power_flag){
 288   5                                                              irdown_flag = 1;        // IR Menu- Button Active
 289   5                                              }
 290   4                                                      osd_timer=0;TR0=1;
 291   4                                              break;
 292   4                                              case irkey_right:       // Right Button
 293   4                                                      osd_timer=0;TR0=1;
 294   4                                                                      
 295   4                                                      #if _debug
 296   4                                                      printf("the key is right.\n");
 297   4                                                      #endif
 298   4                                                      
 299   4                                              if (power_flag)
 300   4                                                      {
 301   5                                                      irright_flag = 1;       // IR Right Button Active
 302   5                                                      }
 303   4                                                      osd_timer=0;TR0=1;
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 6   

 304   4                                              break;
 305   4                                      case irkey_left:        // Left Button
 306   4                                              osd_timer=0;TR0=1;
 307   4      
 308   4                                              #if _debug
 309   4                                              printf("the key is left.\n");
 310   4                                              #endif
 311   4                                              
 312   4                                              if (power_flag)
 313   4                                                      {
 314   5                                                              irleft_flag = 1;        // IR Left Button Active
 315   5                                              }
 316   4                                                      osd_timer=0;TR0=1;
 317   4                                              break;
 318   4                                      //----brightness + - and volume + -    -----------------
 319   4                                              case irkey_bri_add:
 320   4                                                      osd_timer=0;TR0=1;                                              
 321   4                                                      if(power_flag){
 322   5                                                              topmenu_flag=0;
 323   5                                                              irbriadd_flag=1;
 324   5                                                      }
 325   4                                                      osd_timer=0;TR0=1;
 326   4      
 327   4                                                      #if _debug
 328   4                                                      printf("the key is bri_add.\n");
 329   4                                                      #endif
 330   4                                                      break;
 331   4                                              case irkey_bri_sub:
 332   4                                                      osd_timer=0;TR0=1;                                              
 333   4                                                      if(power_flag){
 334   5                                                              topmenu_flag=0;
 335   5                                                              irbrisub_flag=1;
 336   5                                                      }
 337   4                                                      osd_timer=0;TR0=1;
 338   4      
 339   4                                                      #if _debug
 340   4                                                      printf("the key is bri_sub.\n");
 341   4                                                      #endif
 342   4                                                      break;
 343   4                                              case irkey_vol_add:
 344   4                                                      osd_timer=0;TR0=1;                                              
 345   4                                                      if(power_flag){
 346   5                                                              topmenu_flag=0;
 347   5                                                              irvoladd_flag=1;                                                        
 348   5                                                              }
 349   4                                                      osd_timer=0;TR0=1;
 350   4      
 351   4                                                      #if _debug
 352   4                                                      printf("the key is vol_add.\n");
 353   4                                                      #endif
 354   4                                                      break;
 355   4                                              case irkey_vol_sub:
 356   4                                                                                              
 357   4                                                      if(power_flag){
 358   5                                                              topmenu_flag=0;
 359   5                                                              irvolsub_flag=1;
 360   5                                                              }
 361   4                                                      osd_timer=0;TR0=1;      
 362   4                                                      break;
 363   4      
 364   4                                                      #if _debug
 365   4                                                      printf("the key is vol_sub.\n");
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 7   

 366   4                                                      #endif
 367   4                                      //-----------------------------------------------
 368   4                                              default:
 369   4      
 370   4                                                      #if _debug
 371   4                                                      printf("ther key wasn't defined .\n");
 372   4                                                      #endif
 373   4                                                      
 374   4                                                      break;
 375   4                                      }
 376   3                                      IR_data=0;
 377   3                              }
 378   2                              else{
 379   3                                      printf("the IR_customer is error.\n");
 380   3                              }
 381   2                              
 382   2                              ir_start_flag=0;
 383   2                      }
 384   1                      else{
 385   2                              EX1=1;
 386   2                              EA=1;
 387   2              }       
 388   1      }
 389          
 390          
 391          //**************************************************************************
 392          void ir_int1(void) interrupt 2  using 1{
 393   1              unsigned char i;
 394   1              unsigned char data Count;
 395   1              EX1 = 0;
 396   1              IR_data=0;
 397   1              Count=GetCycle();
 398   1              if((Count>175) &&(Count<215)){          
 399   2                      ir_start_flag=1;
 400   2                      }       // The first press button
 401   1              //else if((Count>145)&&(Count<165)){    /*ir_rep_flag=1;*/              
 402   1              //      ir_start_flag=1;//printf("count=%bx\n",Count);
 403   1              //}//repeat press some button .
 404   1              else{
 405   2                      EX1 = 1;
 406   2                      return ;
 407   2              }                                               //not all                       
 408   1              //-----------------------------------------------------------
 409   1              if(ir_start_flag){                      //begin to receive the ir_code . 
 410   2                      for(i=32;i>0;i--){
 411   3                              Count=GetCycle();   IR_data <<= 1;                      
 412   3                              if((Count>26) && (Count<38))     IR_data ++;
 413   3                              else if((Count>10) && (Count<0x21))   ;
 414   3                              else {
 415   4                                      EX1=1;
 416   4                                      return;
 417   4                              }
 418   3                      }
 419   2              }
 420   1              IR_CODE._code=(char)IR_data;    IR_data>>=8;                    
 421   1              IR_CODE.ir_code=(char)IR_data;  IR_data>>=8;                    
 422   1              IR_CODE.customer=(int)IR_data;
 423   1              ir_ok_flag=1;
 424   1      }
 425          //***********************************************************************
 426          unsigned char GetCycle(void){
 427   1          unsigned char data a=0;
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 8   

 428   1              while(!IR) {
 429   2                Delay50us();
 430   2                        a++;
 431   2                        if(a>220){
 432   3                              return a;
 433   3                              }
 434   2                       }
 435   1              while(IR) {
 436   2                Delay50us();
 437   2                        a++;
 438   2                        if(a>220){
 439   3                              return a;
 440   3                              }
 441   2                       }
 442   1              return(a);
 443   1      }
 444          //********************************************************************
 445          void Delay50us(void){
 446   1         unsigned char data a;
 447   1         for(a=10;a>0;a--){
 448   2             _nop_();
 449   2             _nop_();
 450   2             _nop_();
 451   2             _nop_();
 452   2             _nop_();
 453   2            }
 454   1      }
 455          //*************************************************************************
 456          
 457          
 458           //**********************************************************************
 459                  


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    973    ----
   CONSTANT SIZE    =    435    ----
   XDATA SIZE       =     24       1
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      1       3
   IDATA SIZE       =   ----    ----
   BIT SIZE         =     15    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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