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

📄 key_drv.lst

📁 atmel at89c51snd1c mp3芯片方案源码
💻 LST
字号:
C51 COMPILER V7.50   KEY_DRV                                                               02/16/2009 09:59:53 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE KEY_DRV
OBJECT MODULE PLACED IN key_drv.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE lib_mcu\kbd\key_drv.c LARGE BROWSE DEBUG OBJECTEXTEND PRINT(.\key_drv.lst) 
                    -OBJECT(key_drv.obj)

line level    source

   1          
   2          #include "config.h"                         /* lib configuration header */
   3          #include "key_drv.h"                        /* Keyboard driver definition */
   4          #include "modules\song\song_drv.h" 
   5          #include "lib_mcu\lcd\lcd_drv.h" 
   6          #include "lib_mcu\timer\timer_drv.h"
   7          #include "lib_mcu\ide\ide_drv.h"
   8          #include "modules\mass\usb_task.h" 
   9          #include "modules\file\fat.h" 
  10          #include "lib_mcu\remote\remote_drv.h"
  11          
  12          
  13          
  14          extern  bdata   bit     gl_key_press;       /* TRUE when a key is decoded */
  15          extern   Byte    gl_key;                    /* value of the key pressed */
  16          Byte    key_int;
  17          
  18          static  void    kbd_set_prio (Byte);
  19          static  void    kbd_install (void);
  20          
  21          
  22          
  23          
  24          ///////////////////////////////////////////////////////////////////////////////////
  25          void kbd_init (void)
  26          {
  27   1        #if KBD_EXIT_PD
  28   1        Kbd_enable_pd_exit();         /* enable keyboard Power-Down exit */
  29   1        kbd_set_prio(KBD_PRIO);
  30   1        #endif
  31   1        Kbd_disable_int(); 
  32   1        gl_key_press = FALSE;
  33   1      //  Kbd_enable_int();
  34   1        kbd_install();
  35   1      }
  36          
  37          
  38          
  39          ///////////////////////////////////////////////////////////////////////////////////
  40          void kbd_install (void)
  41          {
  42   1      //  KBSTA = KBSTA;                  /* dummy read for clearing pending interrupt */
  43   1        key_int = 0;
  44   1        #if KBD_EXIT_PD
  45   1       // Kbd_enable_int();             /* enable or re-enable the kbd interrupt */
  46   1        Kbd_unmask_int();
  47   1        Kbd_low_int(); 
  48   1        #endif
  49   1      }
  50          
  51          
  52          
  53          ///////////////////////////////////////////////////////////////////////////////////
  54          #if KBD_EXIT_PD
C51 COMPILER V7.50   KEY_DRV                                                               02/16/2009 09:59:53 PAGE 2   

  55          void kbd_set_prio (Byte priority)
  56          {
  57   1        if ((priority == 1) || (priority == 3))     /* set LSB priority bit */
  58   1        {
  59   2          IPL1 |=  MSK_EKB;
  60   2        }
  61   1        if ((priority == 2) || (priority == 3))     /* set MSB priority bit */
  62   1        {
  63   2          IPH1 |= MSK_EKB;
  64   2        }
  65   1      }
  66          #endif
  67          
  68          
  69          
  70          
  71          ///////////////////////////////////////////////////////////////////////////////////
  72          Byte kbd_decode(void)
  73          {
  74   1          Byte key;
  75   1          //key_int = KBSTA;
  76   1      
  77   1          switch (key_int & 0x0f)
  78   1          {
  79   2                case KEY_0:
  80   2                       gl_key_press = TRUE;
  81   2                       key = KEY_0;
  82   2                       kbd_install();
  83   2                               return (key);
  84   2            break;
  85   2      
  86   2                case KEY_1:
  87   2                       gl_key_press = TRUE;
  88   2                       key = KEY_1;
  89   2                               kbd_install();
  90   2                               return (key);
  91   2            break;
  92   2      
  93   2                case KEY_2:
  94   2                       gl_key_press = TRUE;
  95   2                       key = KEY_2;
  96   2                               kbd_install();
  97   2                               return (key);
  98   2            break;
  99   2      
 100   2                case KEY_3:
 101   2                           gl_key_press = TRUE;
 102   2                       key = KEY_3;
 103   2                               kbd_install();
 104   2                               return (key);
 105   2            break;
 106   2      
 107   2                default :
 108   2                           gl_key_press = FALSE;
 109   2                           key = NO_KEY;
 110   2                           kbd_install();
 111   2                               return(0);
 112   2            break;
 113   2              }
 114   1      }
 115          
 116                                
C51 COMPILER V7.50   KEY_DRV                                                               02/16/2009 09:59:53 PAGE 3   

 117          ///////////////////////////////////////////////////////////////////////////////////
 118          #if KBD_EXIT_PD
 119          Interrupt(kbd_int (void), IRQ_KBD)
 120          {
 121   1      //  key_int = KBSTA;
 122   1      //  Kbd_disable_int();              /* disable interrupt */
 123   1        //T0_start();
 124   1      }
 125          #endif
 126          
 127          
 128          
 129          ///////////////////////////////////////////////////////////////////////////////////
 130          
 131          
 132          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    126    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =      1    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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