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

📄 ir.lst

📁 lcd驱动程序:用于au
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE IR
OBJECT MODULE PLACED IN .\HEX\IR.obj
COMPILER INVOKED BY: D:\Program Files\Keil\C51\BIN\C51.EXE IR.C LARGE BROWSE DEBUG OBJECTEXTEND OBJECT(.\HEX\IR.obj)

line level    source

   1          #include <reg51.h>
   2          #include <intrins.h>          // _nop() in the file .
   3          #include <stdio.h>            // printf() in the file .
   4          #include <string.h>
   5          #include "78e65.h"
   6          #include "config.h"
   7          
   8          #include "tda7440d.h"
   9          #include <invx1828.h>
  10          #include <func_shi.h>
  11          #include "ext_globl.h"
  12          #include "ext_osd.h"
  13          #include "osd_vx1828.h"
  14          
  15          //*********************************************************
  16          //      key define 
  17          //*********************************************************
  18          
  19          sbit  IR        =       P3^3;
  20          
  21          #define ir_customer                     0x03fc
  22          //#define IR_CUSTOMER           ir_customer
  23          #if _debug
  24          #define irkey_0                         0x68
  25          #define irkey_1                         0x30
  26          #define   irkey_2                               0xb0
  27          #define irkey_3                         0x70
  28          #define irkey_4                         0xf0
  29          #define irkey_5                         0x08
  30          #define irkey_6                         0x88
  31          #define irkey_7                         0x48
  32          #define irkey_8                         0xc8
  33          #define irkey_9                         0xa8    
  34          #endif
  35          
  36          #define   irkey_power              0x0
  37          #define irkey_menu                      0x1a
  38          #define irkey_select                    0x50
  39          #define         irkey_source                    0xfa
  40          #define   irkey_mute                    0x40
  41          
  42          #define   irkey_up                      0x9a
  43          #define   irkey_down               0x5a
  44          #define   irkey_left                    0xba
  45          #define   irkey_right                   0x7a
  46          
  47          #define   irkey_vol_add         0xea                    
  48          #define   irkey_vol_sub         0x6a
  49          #define   irkey_bri_add         0xaa
  50          #define   irkey_bri_sub         0x2a
  51          //------------------------------------------------
  52          #define   irkey_isp                     0x3a
  53          #define   irtest                        0x0a
  54          //------------------------------------------------
  55          //***************************************************************
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 2   

  56          //define IR program's flag . used in func_ir.c
  57          bit irpower_flag  = 0;  // IR Power Button Active flag
  58          bit irmenu_flag   = 0;  // IR Menu Button Active flag
  59          //bit irinpsel_flag = 0;                // IR Inp_sel Button Active flag
  60          bit irexit_flag   = 0;  // IR Exit Button Active flag
  61          bit irup_flag= 0;       // IR Menu+ Button Active flag
  62          bit irdown_flag= 0;     // IR Menu- Button Active flag
  63          bit irright_flag  = 0;          // IR Right Button Active flag
  64          bit irleft_flag   = 0;          // IR Left Button Active flag
  65          
  66          bit irsource_flag=0;
  67          
  68          bit irbriadd_flag=0;
  69          bit irbrisub_flag=0;
  70          bit irvoladd_flag=0;
  71          bit irvolsub_flag=0;
  72          bit irtimer_flag=0;
  73          //extern void aisel_func(char aisel);
  74          //***************************************************************
  75          extern bit power_flag ;       // defined in the globl.h 
  76          extern unsigned int idata osd_timer;
  77          bit ir_ok_flag=0;
  78          //**********************************************************************
  79          typedef struct {
  80                  unsigned int customer;
  81                  unsigned char ir_code;
  82                  unsigned char _code;
  83          }IR_CODE_TYPE ;
  84          
  85          static IR_CODE_TYPE IR_CODE={0,0,0};
  86          static bit  ir_start_flag=0;
  87          // bit last_code_com=0;     // A flag to show whether the last IR code receive is complete
  88           unsigned long IR_data=0;
  89          //*********************************************************************************
  90          
  91          //extern void DelayXms(char);
  92          unsigned char GetCycle(void);
  93          void Delay50us();
  94          
  95          extern char data channel;
  96          //----------------------------------------------------
  97          static char ispcomd[8]="prog....";
  98          static char usercode[8]="WB05D000";
  99          //----------------------------------------------------
 100          
 101          static char data _test;
 102          
 103          extern bit XIE_Power;
 104          
 105          //*******************************************************************
 106          void ir_server()
 107          {
 108   1                      if(ir_ok_flag==1){
 109   2                              ir_ok_flag=0;
 110   2                              EA=0;
 111   2                              
 112   2                              #if _debug
 113   2                              printf("\n");
 114   2                              printf("customer=%x",IR_CODE.customer);
 115   2                              printf("  code=%bx",IR_CODE.ir_code);
 116   2                              printf("  ^code=%bx\n",IR_CODE._code);
 117   2                              #endif
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 3   

 118   2      
 119   2                              
 120   2                              TI=0;
 121   2                              if(IR_CODE.customer==ir_customer){                      
 122   3                                      switch(IR_CODE.ir_code){
 123   4                                              
 124   4                                      //============= TEST IR ==========================
 125   4                                              case irkey_0:   
 126   4                                                      
 127   4                                                      #if _debug
 128   4                                                      printf("the key is 0.\n");
 129   4                                                      #endif
 130   4                                                      
 131   4                                                      osd_timer=0;TR0=1;
 132   4                                                      break;
 133   4                                              case irkey_1:
 134   4                                                      
 135   4                                                      #if _debug
 136   4                                                      printf("the key is 1.\n");
 137   4                                                      #endif
 138   4                                                      
 139   4                                                      osd_timer=0;TR0=1;
 140   4                                                      break;
 141   4                                              case irkey_2:   
 142   4      
 143   4                                                      #if _debug
 144   4                                                      printf("the key is 2.\n");
 145   4                                                      #endif
 146   4                                                      
 147   4                                                      osd_timer=0;TR0=1;
 148   4                                                      break;
 149   4                                              case irkey_3:
 150   4      
 151   4                                                      #if _debug
 152   4                                                      printf("the key is 3.\n");
 153   4                                                      #endif
 154   4                                                      
 155   4                                                      osd_timer=0;TR0=1;
 156   4                                                      break;
 157   4                                              case irkey_4:
 158   4      
 159   4                                                      #if _debug
 160   4                                                      printf("the key is 4.\n");
 161   4                                                      #endif
 162   4                                                      
 163   4                                                      osd_timer=0;TR0=1;
 164   4                                                      break;
 165   4                                                      
 166   4                                              case irkey_9:  //broning.       
 167   4      
 168   4                                                      #if _debug
 169   4                                                      printf("the key is 9.\n");
 170   4                                                      #endif
 171   4                                                      
 172   4                                                      osd_timer=0;TR0=1;
 173   4                                                      break;
 174   4                                              case irtest:
 175   4      
 176   4                                                      #if _debug
 177   4                                                      printf("test\n");
 178   4                                                      #endif
 179   4                                                      
C51 COMPILER V7.50   IR                                                                    01/17/2006 21:30:46 PAGE 4   

 180   4                                                      irtimer_flag=1;
 181   4                                                      break;
 182   4                                      //===========  ISP BUTTON ==========
 183   4                                              case irkey_isp:  //broning.
 184   4      
 185   4                                                      #if _debug
 186   4                                                      printf("the key is 9.\n");
 187   4                                                      #endif
 188   4                                                      
 189   4                                                      CHPENR=0x87;
 190   4                                                      CHPENR=0x59;
 191   4                                                      CHPCON=0x03;
 192   4                                                      CHPENR=0x00;
 193   4                                                      IP=0x02;
 194   4                                                      EA=1;
 195   4                                                      ET0= 1;
 196   4      
 197   4                                                      TH0=0x04;
 198   4                                                      TL0=0x04;
 199   4      
 200   4                                                      TMOD=0x02;
 201   4                                                      TR0=1;
 202   4                                                      PCON=1;
 203   4                                                      break;
 204   4                                                      
 205   4                                      //==============================================
 206   4                                              case irkey_power:       // Power Button
 207   4                                                      osd_timer=0;TR0=1;
 208   4      
 209   4                                                      #if _debug
 210   4                                                      printf("the key is power.\n");
 211   4                                                      #endif
 212   4                                                      
 213   4                                                      irpower_flag = 1;       // IR Power Button Active
 214   4                                                      XIE_Power=0;
 215   4                                                      osd_timer=0;TR0=1;
 216   4                                                      break;
 217   4                                              case irkey_mute:        
 218   4      
 219   4                                                      #if _debug
 220   4                                                      printf("the key is mute.\n");
 221   4                                                      #endif
 222   4                                                      
 223   4                                                      osd_timer=0;
 224   4                                                      if(power_flag)
 225   4                                                      {
 226   5                                                              mute_flag=~mute_flag;
 227   5                                                              if(mute_flag){                          
 228   6                                                                      //mute_disp();printf("mute_menu run\n");
 229   6                                                                      
 230   6                                                                      set_audio_mute(1);
 231   6                                                                      #if _debug
 232   6                                                                      printf("set_audio_mute.\n");
 233   6                                                                      #endif
 234   6                                                                      

⌨️ 快捷键说明

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