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

📄 timer.lst

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


C51 COMPILER V7.50, COMPILATION OF MODULE TIMER
OBJECT MODULE PLACED IN .\HEX\Timer.obj
COMPILER INVOKED BY: D:\Program Files\Keil\C51\BIN\C51.EXE Timer.c LARGE BROWSE DEBUG OBJECTEXTEND OBJECT(.\HEX\Timer.ob
                    -j)

line level    source

   1          
   2          #include "osd_vx1828.h"
   3          #include "ext_globl.h"
   4          #include "ext_osd.h"
   5          #include "ir.h"
   6          #include "func_shi.h"
   7          #include "menu.h"
   8          #include "config.h"
   9          #include "pindef.h"
  10          #if _debug
  11          #include <stdio.h>               // printf() in the file .
  12          #endif  
  13          #define EEPROM          0xA0
  14          
  15          #define title                           0x01
  16          #define content                 0x02
  17          #define bottom                  0x03
  18          #define highlight                       0x01
  19          #define normal                  0x00
  20          #define foreground              0x01
  21          #define background              0x00
  22          #define bl                      0x01
  23          #define hl                      0x00
  24          #define britc                   0x00
  25          #define contc                   0x01
  26          #define satr                    0x02
  27          #define hue                     0x03
  28          #define sharp           0x04
  29          // Define Color .
  30          #define Black                                   0x00
  31          #define Blue                                    0x01
  32          #define Green                           0x02
  33          #define Cyan                                    0x03
  34          #define Red                                     0x04
  35          #define Fuchsia                         0x05
  36          #define Yellow                          0x06
  37          #define White                           0x07
  38          #define Transparent                     0x08
  39          #define RoyalBlue                               0x09
  40          #define MediumAquamarine             0x0a
  41          #define LightGreen                      0x0b
  42          #define Orange                          0x0c
  43          #define HotPink                         0x0d
  44          #define Silver                          0x0e
  45          #define Gray                                    0x0f
  46          
  47          
  48          
  49          
  50          sbit ptime_int2 = P1^7;//zl.d
  51          sbit ptime_int1 = P3^6;
  52          
  53          
  54          extern unsigned int idata osd_timer;
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 2   

  55                                          
  56          extern bit  XIE_Power;
  57          
  58          struct TIME{
  59          //nsigned char year;
  60          //nsigned char month;
  61          //nsigned char day;
  62                  unsigned char hour;
  63                  unsigned char minute;
  64                  unsigned char second;
  65          };
  66          
  67          void read_timer(char,struct TIME *);
  68          void write_timer(char,struct TIME *);
  69          void timer_on_off(void);
  70          
  71          static struct TIME      curr_time={0,0,0},on_time={0,0,0},off_time={0,0,0};
  72          unsigned char timer_able_flag=0;
  73          static data Timer_numer=0;
  74          
  75          
  76          
  77          unsigned char time_sel=1;
  78          bit timeshow_flag=0;
  79          extern unsigned int idata osd_timer;
  80          
  81          char code Timer[0x06]={0x6d,0x13,0x22,0x26,0x1e,0x2b};
  82          char code enable[0x07]={0x6d,0x1e,0x27,0x1a,0x1b,0x25,0x1e};
  83          char code disable[0x07]={0x1d,0x22,0x2c,0x1a,0x1b,0x25,0x1e};
  84          char code TIME_SET_UP[14]={0x13,0x08,0x0c,0x04,0x6d,0x12,0x04,0x13,0x6d,0x14,0x0f};
  85          char code current_time[14]={0x1c,0x2e,0x2b,0x2b,0x1e,0x27,0x2d,0x6d,0x6d,0x2d,0x22,0x26,0x1e,0x6d};
  86          char code power_on_time[14]={0x29,0x28,0x30,0x1e,0x2b,0x6d,0x28,0x27,0x6d,0x6d,0x2d,0x22,0x26,0x1e};
  87          char code power_off_time[14]={0x29,0x28,0x30,0x1e,0x2b,0x6d,0x28,0x1f,0x1f,0x6d,0x2d,0x22,0x26,0x1e};
  88          char code time_exit[4]={0x1e,0x31,0x22,0x2d};
  89          
  90          //=========================================================
  91          void init_timer_menu()
  92          {
  93   1           // Set initial address of OSD block
  94   1              osd_clearall();
  95   1              osd_madr(content,0x30);         // Set the initial address of Content Block
  96   1              osd_switch(4);// Turn the OSD T/C/B block off
  97   1              // Disable blink or highlight zone
  98   1              osd_hbsection(content,bl,0x00,0x00,0x00,0x00);
  99   1              osd_hbsection(content,hl,0x00,0x00,0x00,0x00);
 100   1              // Set size of block
 101   1              osd_size(content,0x20,0x05);            // Set Content block size   adjust by cswu.
 102   1              // Set position of block
 103   1              osd_pos(content,0x40,19);               // Set Content block position
 104   1              // Select Block Color
 105   1      
 106   1                      osd_color(title,foreground,normal,LightGreen);  // Content
 107   1              osd_color(title,background,normal,Transparent);         // Content
 108   1      
 109   1                      
 110   1              osd_color(content,foreground,normal,LightGreen);        // Content
 111   1              osd_color(content,background,normal,Transparent);               // Content
 112   1              osd_color(content,foreground,highlight,HotPink);        // Content
 113   1              osd_color(content,background,highlight,Transparent);    // Content
 114   1           
 115   1              osd_clear(0x30);osd_clear(0x40);
 116   1              osd_clear(0x50);osd_clear(0x60);
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 3   

 117   1              osd_clear(0x70);osd_clear(0x80);
 118   1              osd_clear(0x90);osd_clear(0xa0);
 119   1              osd_clear(0xb0);osd_clear(0xc0);
 120   1              //osd_clear(0xa0);osd_clear(0xb0);
 121   1              osd_show(0x3A,10,&TIME_SET_UP);
 122   1              osd_show(0x50,13,&current_time);
 123   1              osd_show(0x70,13,&power_on_time);
 124   1              osd_show(0x90,13,&power_off_time);
 125   1              //osd_show(0xb0,4,&Timer);
 126   1              osd_show(0xb0,0x03,&time_exit);
 127   1              
 128   1              osd_switch(6);  // Turn Title/Content/Bottom Block on
 129   1      }
 130          
 131          //===============================================================
 132          void current_time_menu(unsigned char temphour,unsigned char  tempminute,unsigned char  tempsecond)//zl.d
 133          {
 134   1          unsigned char idata temp[8];
 135   1          unsigned char idata i; 
 136   1      
 137   1      // Show Number of hour --------------------------------------
 138   1          temp[0] = temphour/10 + 0x62;       // 1
 139   1          i = temphour%10;
 140   1          temp[1] = i + 0x62; // 2
 141   1          temp[2]=0x47;
 142   1          // Show Number of minute -----------------------------------
 143   1          temp[3] = tempminute/10 + 0x62;     // 1
 144   1          i = tempminute%10;
 145   1          temp[4] = i + 0x62; // 2
 146   1          temp[5] = 0x47;
 147   1       // Show Number of second -----------------------------------
 148   1          temp[6] =tempsecond/10 + 0x62;
 149   1          i = tempsecond%10;
 150   1          temp[7] = i + 0x62; // 3
 151   1              
 152   1          
 153   1          osd_show(0x62,7,&temp);
 154   1              
 155   1      }
 156          void on_time_menu(unsigned char temphour,unsigned char  tempminute)
 157          {
 158   1          unsigned char idata temp[5];
 159   1          unsigned char idata i; 
 160   1      
 161   1      // Show Number of hour --------------------------------------
 162   1          temp[0] = temphour/10 + 0x62;       // 1
 163   1          i = temphour%10;
 164   1          temp[1] = i + 0x62; // 2
 165   1          temp[2]=0x47;
 166   1          // Show Number of minute -----------------------------------
 167   1          temp[3] = tempminute/10 + 0x62;     // 1
 168   1          i = tempminute%10;
 169   1          temp[4] = i + 0x62; // 2
 170   1          osd_show(0x82,4,&temp);
 171   1      }
 172          void off_time_menu(unsigned char temphour,unsigned char  tempminute)
 173          {
 174   1          unsigned char data temp[5];
 175   1          unsigned char data i; 
 176   1      
 177   1      // Show Number of hour --------------------------------------
 178   1          temp[0] = temphour/10 + 0x62;       // 1
C51 COMPILER V7.50   TIMER                                                                 01/17/2006 21:30:47 PAGE 4   

 179   1          i = temphour%10;
 180   1          temp[1] = i + 0x62; // 2
 181   1          temp[2]=0x47;
 182   1          // Show Number of minute -----------------------------------
 183   1          temp[3] = tempminute/10 + 0x62;     // 1
 184   1          i = tempminute%10;
 185   1          temp[4] = i + 0x62; // 2
 186   1          osd_show(0xa2,4,&temp);
 187   1      }
 188          void able_time_menu(unsigned char able)
 189          {
 190   1              if(able){
 191   2                      osd_show(0x89,6,&enable);
 192   2                      osd_show(0xa9,6,&enable);
 193   2              }
 194   1              else{
 195   2                      osd_show(0x89,6,&disable);
 196   2                      osd_show(0xa9,6,&disable);
 197   2              }
 198   1      }
 199          //==================================================
 200          #if 1
 201          void time_setup_process()
 202          {
 203   1              unsigned char data temp[5]=0,temp1[3]=0 ,tmp3[7]=0;
 204   1              if(timemenu_flag){
 205   2                      if(!timeshow_flag){
 206   3      
 207   3      
 208   3                      /*      tmp3[0]=1;tmp3[1]=2;tmp3[2]=3;
 209   3                      shi_sub_write1(0x66, 0x02, &tmp3);
 210   3                      shi_sub_read1( 0x66, 0x02, &tmp3);
 211   3                      printf("state4==%bx%bx%bx\n",tmp3[0],tmp3[1],tmp3[2]);
 212   3                      tmp3[0]=4;tmp3[1]=5;tmp3[2]=6;
 213   3                      shi_sub_write1(0x66, 0x02, &tmp3);
 214   3                      shi_sub_read1( 0x66, 0x02, &tmp3);
 215   3                      printf("state4==%bx%bx%bx\n",tmp3[0],tmp3[1],tmp3[2]);
 216   3                      tmp3[0]=17;tmp3[1]=18;tmp3[2]=9;
 217   3                      shi_sub_write1(0x66, 0x02, &tmp3);
 218   3                      shi_sub_read1( 0x66, 0x02, &tmp3);
 219   3                      printf("state4==%bx%bx%bx\n",tmp3[0],tmp3[1],tmp3[2]);
 220   3      
 221   3      
 222   3                              curr_time.hour=0, curr_time.minute=0;                   
 223   3                              read_timer(&curr_time);//zl.d
 224   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);
 225   3                              write_timer(&curr_time);
 226   3                              curr_time.hour=0, curr_time.minute=0;
 227   3                              read_timer(&curr_time);//zl.d
 228   3                              printf("curr_time.hour, curr_time.minute==%bx%bx\n",curr_time.hour, curr_time.minute);

⌨️ 快捷键说明

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