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

📄 disp.lst

📁 本人at89c51snd1c主控IC增加了128*32点阵驱动显示
💻 LST
📖 第 1 页 / 共 4 页
字号:
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 1   


C51 COMPILER V7.20, COMPILATION OF MODULE DISP
OBJECT MODULE PLACED IN .\Output\disp.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE modules\display\disp.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system;.\;
                    -.\;.\lib_refd) DEFINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\Output\disp.lst) OBJECT(.\Output\disp.obj)

line level    source

   1          /*C**************************************************************************
   2          * NAME:         disp.c
   3          *----------------------------------------------------------------------------
   4          * Copyright (c) 2003 Atmel.
   5          *----------------------------------------------------------------------------
   6          * RELEASE:      snd1c-refd-nf-4_0_3      
   7          * REVISION:     1.12     
   8          *----------------------------------------------------------------------------
   9          * PURPOSE:
  10          * This file contains the high level display routines
  11          *****************************************************************************/
  12          
  13          /*_____ I N C L U D E S ____________________________________________________*/
  14          
  15          #include "config.h"                 /* system configuration */
  16          #include "lib_mcu\kbd\kbd_drv.h"    /* Keyboard driver definition */
  17          #include "modules\song\song_drv.h"  /* song driver definition */
  18          #include "modules\file\file.h"      /* file definition */
  19          #include "disp_task.h"              /* display task definition */
  20          #include "disp.h"                   /* display definition */
  21          #include "modules\display\icon.h"
  22          #if CONF_DISPLAY == LED
  23          #include "modules\mem\mem_task.h"           /* memory task definition */
  24          #include "modules\display\led.h"            /* led definition */
  25          #endif
  26          extern void PutCodeToLCD( Byte *pBuffer, Uchar Loop );
  27          extern void Draw2Digit( Uchar Pos, Uchar HexCode );
  28          extern void Draw8x6Icons( Uchar Page, Uchar Column, Uchar Index );
  29          extern void LCDClearLine( Uchar page, Uchar column, Uint16 Length );
  30          extern void PutToChina(Uchar Page ,Uchar Column,Uchar code *prt );
  31          /*_____ M A C R O S ________________________________________________________*/
  32          
  33          
  34          /*_____ D E F I N I T I O N ________________________________________________*/
  35          
  36          #if CONF_DISPLAY == LCD
                extern  bdata   bit     gl_kbd_lock;   /* set to TRUE if keyboard locked */
                extern  bdata   bit     fs_memory;     /* selected file system */
              
              /* mode patterns */
              code    Byte cgram_mass[] =   { 0x04, 0x06, 0x0D, 0x15, 0x14, 0x04, 0x0E, 0x04 };
              code    Byte cgram_song[] =   { 0x03, 0x0F, 0x0D, 0x09, 0x09, 0x0B, 0x1B, 0x18 };
              code    Byte cgram_voice[] =  { 0x00, 0x0D, 0x13, 0x13, 0x13, 0x0D, 0x00, 0x00 };
              code    Byte cgram_tools[] =  { 0x0E, 0x04, 0x15, 0x1F, 0x11, 0x1F, 0x04, 0x04 };
              
              /* state patterns */
              code    Byte cgram_stop[] =   { 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00 };
              code    Byte cgram_play[] =   { 0x00, 0x08, 0x0C, 0x0E, 0x0F, 0x0E, 0x0C, 0x08 };
              code    Byte cgram_pause[] =  { 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 };
              code    Byte cgram_rec[] =    { 0x00, 0x00, 0x1F, 0x0E, 0x04, 0x1F, 0x00, 0x00 };
              
              /* sound patterns */
              code    Byte cgram_volume[] = { 0x02, 0x06, 0x1A, 0x12, 0x1A, 0x06, 0x02, 0x00 };
              code    Byte cgram_bass[] =   { 0x07, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x00 };
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 2   

              code    Byte cgram_medium[] = { 0x04, 0x0A, 0x0A, 0x0A, 0x11, 0x11, 0x11, 0x00 };
              code    Byte cgram_treble[] = { 0x1C, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00 };
              
              /* memory patterns */
              #if (MEM_CHIP_TYPE != CHIP_HDD)
                code    Byte cgram_chip[] =   { 0x0E, 0x1B, 0x0A, 0x1B, 0x0A, 0x1B, 0x0E, 0x00 };
              #else
                code    Byte cgram_chip[] =   { 0x04, 0xA, 0x15, 0x11, 0x11, 0x15, 0x0A, 0x04 };
              #endif
              
              #if (MEM_CARD_TYPE != CARD_CDR)
                code    Byte cgram_card[] =   { 0x1C, 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F };
              #else
                code    Byte cgram_card[] =   { 0x04, 0x0A, 0x15, 0x15, 0x0A, 0x04, 0x00, 0x00 };
              #endif
              
              code    Byte cgram_card1[] =  { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x11, 0x11, 0x1F };
              code    Byte cgram_card2[] =  { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x15, 0x11, 0x1F };
              
              /* file pattern */
              code    Byte cgram_mp3[] =    { 0x04, 0x06, 0x07, 0x04, 0x04, 0x0C, 0x1C, 0x08 };
              code    Byte cgram_wav[] =    { 0x00, 0x00, 0x02, 0x15, 0x15, 0x08, 0x00, 0x00 };
              code    Byte cgram_dir[] =    { 0x00, 0x00, 0x00, 0x0C, 0x13, 0x11, 0x1F, 0x00 };
              
              /* repeat pattern */
              code    Byte cgram_repeat[] = { 0x00, 0x00, 0x0E, 0x01, 0x09, 0x1E, 0x08, 0x00 };
              code    Byte cgram_rep_A[] =  { 0x02, 0x1F, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 };
              code    Byte cgram_rep_B[] =  { 0x02, 0x1F, 0x02, 0x00, 0x00, 0x08, 0x1F, 0x08 };
              
              /* misc pattern */
              code    Byte cgram_lock[] =   { 0x04, 0x1C, 0x0C, 0x04, 0x04, 0x0C, 0x12, 0x0C };
              code    Byte cgram_blank[] =  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
              code    Byte cgram_error[] =  { 0x00, 0x00, 0x00, 0x0A, 0x04, 0x0A, 0x00, 0x00 };
              
              
              #else
  91            extern  xdata Byte    func_timeout;
  92            extern  xdata Byte    func_state;
  93            extern  xdata Byte    ref_state;
  94            extern        bit     playing;
  95            extern        bit     recording;
  96            extern        bit     pause;
  97            extern        bit     bargraph;
  98            extern        Byte    song_sound;
  99            extern  xdata Byte    LED_ON;
 100            extern  xdata Byte    LED_FAST;
 101            extern  Byte    mem_state;                  /* task state */
 102          #endif
 103          Uchar code  abcd[]={0x10,0x61,0x06,0xe0,0x18,0x84,0xe4,0x1c,0x84,0x65,0xbe,0x24,0xa4,0x64,0x04,0x00,
 104                              0x04,0x04,0xff,0x00,0x01,0x00,0xff,0x41,0x21,0x12,0x0c,0x1b,0x61,0xc0,0x40,0x00};
 105          code    Byte cgram_mp3[] =    { 0x04, 0x06, 0x07, 0x04, 0x04, 0x0C, 0x1C, 0x08 };
 106          code    Byte cgram_wav[] =    { 0x00, 0x00, 0x02, 0x15, 0x15, 0x08, 0x00, 0x00 };
 107          code    Byte cgram_dir[] =    { 0x00, 0x00, 0x00, 0x0C, 0x13, 0x11, 0x1F, 0x00 };
 108          code    Byte cgram_blank[] =  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 109          
 110          extern void PutCodeToLCD( Byte *pBuffer, Uchar Loop );
 111          extern void SetLCDAddress( Uchar Page, Uchar Column );
 112          
 113          /*_____ D E C L A R A T I O N ______________________________________________*/
 114          
 115          
 116          /*F**************************************************************************
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 3   

 117          * NAME: print_init
 118          *----------------------------------------------------------------------------
 119          * PARAMS:
 120          *
 121          * return:
 122          *----------------------------------------------------------------------------
 123          * PURPOSE:
 124          *   Print initialization
 125          *----------------------------------------------------------------------------
 126          * EXAMPLE:
 127          *----------------------------------------------------------------------------
 128          * NOTE:
 129          *----------------------------------------------------------------------------
 130          * REQUIREMENTS:
 131          *****************************************************************************/
 132          void print_init (void)
 133          {    
 134   1              Uchar loop1;
 135   1      #if CONF_DISPLAY == LCD
                //LCDDisplayInit ();                              /* lcd initialization */
               // lcd_cgram(CGRAM_SOUND, cgram_volume);     /* init volume icon */
               // lcd_cgram(CGRAM_REPEAT, cgram_repeat);    /* init repeat icon */
               // lcd_cgram(CGRAM_MODE, cgram_song);        /* init mode icon to song */
                //lcd_cgram(CGRAM_STATE, cgram_stop);       /* init state icon to stop */
                print_kbd_lock();                         /* set lock icon or not */
              #else
 143   1      
 144   1           SetLCDAddress( PLAY_VOL_ICON_X_POS, PLAY_VOL_ICON_Y_POS); /* init volume icon */
 145   1            for( loop1 = 0; loop1 < 32; loop1++ )
 146   1           PutCodeToLCD( &VolumeStep[loop1], 32 );
 147   1           led_task_init();
 148   1      #endif
 149   1      }
 150          
 151          
 152          /*F**************************************************************************
 153          * NAME: print_state_blank
 154          *----------------------------------------------------------------------------
 155          * PARAMS:
 156          *
 157          * return:
 158          *----------------------------------------------------------------------------
 159          * PURPOSE:
 160          *   Print the blank icon
 161          *----------------------------------------------------------------------------
 162          * EXAMPLE:
 163          *----------------------------------------------------------------------------
 164          * NOTE:
 165          *----------------------------------------------------------------------------
 166          * REQUIREMENTS:
 167          *****************************************************************************/
 168          void print_state_blank (void)
 169          {
 170   1      #if CONF_DISPLAY == LCD
                //lcd_cgram(CGRAM_STATE, cgram_blank);      /* select blank icon */
              #endif
 173   1      }
 174          
 175          
 176          /*F**************************************************************************
 177          * NAME: print_state_stop
 178          *----------------------------------------------------------------------------
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 4   

 179          * PARAMS:
 180          *
 181          * return:
 182          *----------------------------------------------------------------------------
 183          * PURPOSE:
 184          *   Print the stop icon
 185          *----------------------------------------------------------------------------
 186          * EXAMPLE:
 187          *----------------------------------------------------------------------------
 188          * NOTE:
 189          *----------------------------------------------------------------------------
 190          * REQUIREMENTS:
 191          *****************************************************************************/
 192          void print_state_stop (void)
 193          {
 194   1      #if CONF_DISPLAY == LCD
                lcd_cgram(CGRAM_STATE, cgram_stop);       /* select stop icon */
              #else
 197   1          SetLCDAddress( PLAY_STATE_ICON_X_POS, PLAY_STATE_ICON_Y_POS);
 198   1          PutCodeToLCD( &PlaymodeIcon[2][0], 10 );
 199   1              
 200   1          // second page
 201   1          SetLCDAddress(PLAY_STATE_ICON_X_POS+ 1 ,PLAY_STATE_ICON_Y_POS );
 202   1          PutCodeToLCD( &PlaymodeIcon[2][10], 10 );
 203   1        LED_FAST = 3;
 204   1      #endif
 205   1      }
 206          
 207          
 208          /*F**************************************************************************
 209          * NAME: print_state_play
 210          *----------------------------------------------------------------------------
 211          * PARAMS:
 212          *
 213          * return:
 214          *----------------------------------------------------------------------------
 215          * PURPOSE:
 216          *   Print the play icon
 217          *----------------------------------------------------------------------------
 218          * EXAMPLE:
 219          *----------------------------------------------------------------------------
 220          * NOTE:
 221          *----------------------------------------------------------------------------
 222          * REQUIREMENTS:
 223          *****************************************************************************/
 224          void print_state_play (void)
 225          {
 226   1               Uchar *prt;
 227   1               prt=abcd;
 228   1      #if CONF_DISPLAY == LCD
                //lcd_cgram(CGRAM_STATE, cgram_play);       /* select play icon */
                  SetLCDAddress( PLAY_STATE_ICON_X_POS, PLAY_STATE_ICON_Y_POS);
                  PutCodeToLCD( &PlaymodeIcon[0][0], 10 );
                      
                  // second page
                  SetLCDAddress(PLAY_STATE_ICON_X_POS+ 1 ,PLAY_STATE_ICON_Y_POS );
                  PutCodeToLCD( &PlaymodeIcon[0][10], 10 );
              #else
 237   1        
 238   1           SetLCDAddress( PLAY_STATE_ICON_X_POS, PLAY_STATE_ICON_Y_POS);
 239   1          PutCodeToLCD( &PlaymodeIcon[0][0], 10 );
 240   1              
C51 COMPILER V7.20   DISP                                                                  03/24/2007 10:02:40 PAGE 5   

 241   1          // second page
 242   1          SetLCDAddress(PLAY_STATE_ICON_X_POS+ 1 ,PLAY_STATE_ICON_Y_POS );
 243   1          PutCodeToLCD( &PlaymodeIcon[0][10], 10 );
 244   1          
 245   1        
 246   1         //SetLCDAddress( PLAY_STATE_ICON_X_POS, PLAY_STATE_ICON_Y_POS);
 247   1         //PutToChina(PLAY_STATE_ICON_X_POS ,PLAY_STATE_ICON_Y_POS,prt );
 248   1         //PutCodeToLCD( prt, 32 );
 249   1        LED_ON = (8 >> ref_state);
 250   1        LED_FAST = 1;
 251   1        func_state = 0;
 252   1        playing = TRUE;  
 253   1      #endif
 254   1      }
 255          
 256          
 257          /*F**************************************************************************
 258          * NAME: print_state_pause
 259          *----------------------------------------------------------------------------
 260          * PARAMS:
 261          *
 262          * return:
 263          *----------------------------------------------------------------------------
 264          * PURPOSE:
 265          *   Print the pause icon
 266          *----------------------------------------------------------------------------
 267          * EXAMPLE:
 268          *----------------------------------------------------------------------------
 269          * NOTE:
 270          *----------------------------------------------------------------------------
 271          * REQUIREMENTS:
 272          *****************************************************************************/
 273          void print_state_pause (void)
 274          {
 275   1      //      Uchar _loop3;
 276   1      #if CONF_DISPLAY == LCD
                //lcd_cgram(CGRAM_STATE, cgram_pause);      /* select pause icon */
                SetLCDAddress( PLAY_STATE_ICON_X_POS, PLAY_STATE_ICON_Y_POS);
                  PutCodeToLCD( &PlaymodeIcon[1][0], 10 );
                      
                  // second page
                  SetLCDAddress(PLAY_STATE_ICON_X_POS+ 1 ,PLAY_STATE_ICON_Y_POS );
                  PutCodeToLCD( &PlaymodeIcon[1][10], 10 );

⌨️ 快捷键说明

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