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

📄 ir.lst

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


C51 COMPILER V7.50, COMPILATION OF MODULE IR
OBJECT MODULE PLACED IN .\HEX\IR.obj
COMPILER INVOKED BY: F:\Keil\C51\BIN\C51.EXE IR.C LARGE BROWSE DEBUG OBJECTEXTEND PRINT(.\lst\IR.lst) OBJECT(.\HEX\IR.ob
                    -j)

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          //------------------------------------------------
C51 COMPILER V7.50   IR                                                                    01/14/2006 15:30:03 PAGE 2   

  55          //***************************************************************
  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                              #if _debug
 112   2                              printf("\n");
 113   2                              printf("customer=%x",IR_CODE.customer);
 114   2                              printf("  code=%bx",IR_CODE.ir_code);
 115   2                              printf("  ^code=%bx\n",IR_CODE._code);
 116   2                              #endif
C51 COMPILER V7.50   IR                                                                    01/14/2006 15:30:03 PAGE 3   

 117   2                              TI=0;
 118   2                              if(IR_CODE.customer==ir_customer){                      
 119   3                                      switch(IR_CODE.ir_code){
 120   4                                              
 121   4                                      //============= TEST IR ==========================
 122   4                                              case irkey_0:           
 123   4                                                      printf("the key is 0.\n");
 124   4                                                      osd_timer=0;TR0=1;
 125   4                                                      break;
 126   4                                              case irkey_1:
 127   4                                                      printf("the key is 1.\n");
 128   4                                                      osd_timer=0;TR0=1;
 129   4                                                      break;
 130   4                                              case irkey_2:           
 131   4                                                      printf("the key is 2.\n");
 132   4                                                      osd_timer=0;TR0=1;
 133   4                                                      break;
 134   4                                              case irkey_3:
 135   4                                                      printf("the key is 3.\n");
 136   4                                                      osd_timer=0;TR0=1;
 137   4                                                      break;
 138   4                                              case irkey_4:
 139   4                                                      printf("the key is 4.\n");
 140   4                                                      osd_timer=0;TR0=1;
 141   4                                                      break;
 142   4                                                      
 143   4                                              case irkey_9:  //broning.                                       
 144   4                                                      printf("the key is 9.\n");
 145   4                                                      osd_timer=0;TR0=1;
 146   4                                                      break;
 147   4                                              case irtest:
 148   4                                                      printf("test\n");
 149   4                                                      irtimer_flag=1;
 150   4                                                      break;
 151   4                                      //===========  ISP BUTTON ==========
 152   4                                              case irkey_isp:  //broning.
 153   4                                              
 154   4                                                      printf("the key is 9.\n");
 155   4                                                      CHPENR=0x87;
 156   4                                                      CHPENR=0x59;
 157   4                                                      CHPCON=0x03;
 158   4                                                      CHPENR=0x00;
 159   4                                                      IP=0x02;
 160   4                                                      EA=1;
 161   4                                                      ET0= 1;
 162   4      
 163   4                                                      TH0=0x04;
 164   4                                                      TL0=0x04;
 165   4      
 166   4                                                      TMOD=0x02;
 167   4                                                      TR0=1;
 168   4                                                      PCON=1;
 169   4                                                      break;
 170   4                                                      
 171   4                                      //==============================================
 172   4                                              case irkey_power:       // Power Button
 173   4                                                      osd_timer=0;TR0=1;
 174   4                                                      printf("the key is power.\n");
 175   4                                                      irpower_flag = 1;       // IR Power Button Active
 176   4                                                      XIE_Power=0;
 177   4                                                      osd_timer=0;TR0=1;
 178   4                                                      break;
C51 COMPILER V7.50   IR                                                                    01/14/2006 15:30:03 PAGE 4   

 179   4                                              case irkey_mute:                
 180   4                                                      printf("the key is mute.\n");
 181   4                                                      osd_timer=0;
 182   4                                                      if(power_flag)
 183   4                                                      {
 184   5                                                              mute_flag=~mute_flag;
 185   5                                                              if(mute_flag){                          
 186   6                                                                      //mute_disp();printf("mute_menu run\n");
 187   6                                                                      
 188   6                                                                      set_audio_mute(1);printf("set_audio_mute.\n");
 189   6                                                              }
 190   5                                                              else{

⌨️ 快捷键说明

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