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

📄 por.lst

📁 Bitek 公司 bit1611b模拟屏驱动芯片外接MCU驱动DEMO源码
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.50   POR                                                                   02/05/2007 16:33:25 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE POR
OBJECT MODULE PLACED IN .\OBJ\POR.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE POR.C ROM(COMPACT) OPTIMIZE(9,SPEED) NOAREGS DEFINE(PROJECT=DMO04015800,MCU
                    -_CFG=BIT5101,VP_IF_CFG=VP_IF_BITEK) PRINT(.\LST\POR.lst) OBJECT(.\OBJ\POR.obj)

line level    source

   1          /* **********************************************************************
   2          
   3                   Copyright (c) 2002-2006 Beyond Innovation Technology Co., Ltd
   4          
   5                  All rights are reserved. Reproduction in whole or in parts is
   6              prohibited without the prior written consent of the copyright owner.
   7             ----------------------------------------------------------------------
   8          
   9              Module: POR.C - Power-On-Reset.
  10          
  11              Purpose: Implementation of POR module.
  12          
  13              Version: 0.01                                   11:26AM  2005/11/17
  14          
  15              Compiler: Keil 8051 C Compiler v8.01
  16          
  17              Reference:
  18          
  19             ----------------------------------------------------------------------
  20              Modification:
  21          
  22              R0.01 11:26AM  2005/11/17 Jeffrey Chang
  23              Reason:
  24                  1. Original.
  25              Solution:
  26          
  27             ********************************************************************** */
  28          
  29          #define _POR_C_
  30          
  31          /* ------------------------------------
  32              Header Files
  33             ------------------------------------ */
  34          #include "bitek.h"
  35          #include "dispatch.h"
  36          #include "eeprom.h"
  37          #include "font.h"
  38          #include "i2c.h"
  39          #include "key.h"
  40          #include "led.h"
  41          #include "mcu.h"
  42          #include "menu.h"
  43          #include "osd.h"
  44          #include "platform.h"
  45          #include "por.h"
  46          #include "timer.h"
  47          #include "yuv.h"
  48          
  49          
  50          #if (AUDIO_CFG != AUDIO_00_NONE)
                  #include "audio.h"
              #endif
  53          
  54          #if (IR_CFG != IR_00_UNUSE)
C51 COMPILER V7.50   POR                                                                   02/05/2007 16:33:25 PAGE 2   

                  #include "ir.h"
              #endif
  57          
  58          #if (TFT_CFG == TFT_49_AUO_A025DL01)        ||  \
  59              (TFT_CFG == TFT_58_TOPPOLY_TD025THEB2)
  60              #include "spi.h"
  61          #endif
  62          
  63          #if (PROJECT == DMO04012501)
                  #include "tuner.h"
              #endif
  66          
  67          
  68          /* ------------------------------------
  69              Macro Definitions
  70             ------------------------------------ */
  71          
  72          /* ------------------------------------
  73              Type Definitions
  74             ------------------------------------ */
  75          
  76          
  77          /* ------------------------------------
  78              Variables Definitions
  79             ------------------------------------ */
  80          
  81          /* ------------------------------------
  82              Function Prototypes
  83             ------------------------------------ */
  84          
  85          
  86          /* -------------------------------------------------------------------
  87              Name: POR_Init -
  88              Purpose: To initialize system power-on reset module.
  89              Passed: None.
  90              Returns: None.
  91              Notes:
  92             ------------------------------------------------------------------- */
  93          void POR_Init (void)
  94          {
  95   1          /* Initiate MCU */
  96   1          MCU_Init();
  97   1      
  98   1          /* Initiate TIMER */
  99   1          TIMER_Init();
 100   1      
 101   1          /* Initiate KEY */
 102   1          KEY_Init();
 103   1      
 104   1          /* Initiate I2C */
 105   1          I2C_Init();
 106   1      
 107   1          /* Initiate BITEK */
 108   1          BITEK_Init();
 109   1      
 110   1          #if (MENU_STYLE_CFG == MENU_STYLE_SCROLLING_6)
                  AUDIO_Init();
                  #endif
 113   1      
 114   1          /* Initiate DISPATCH */
 115   1          DISPATCH_Init();
 116   1      
C51 COMPILER V7.50   POR                                                                   02/05/2007 16:33:25 PAGE 3   

 117   1          /* Initiate LED */
 118   1          LED_Init();
 119   1      
 120   1      
 121   1          /* Initiate EEPROM */
 122   1          EEPROM_Init();
 123   1      
 124   1      
 125   1      
 126   1          #if (TFT_CFG == TFT_49_AUO_A025DL01)        ||  \
 127   1              (TFT_CFG == TFT_58_TOPPOLY_TD025THEB2)
 128   1          SPI_Init();
 129   1          #endif
 130   1      
 131   1          /* [4]87 Enable all interrupts */
 132   1          EA = 1;
 133   1      
 134   1      
 135   1          /* ::::::::::::::::::::::::::::::::::::
 136   1              To recall all data structures (EGD and EYD) from EEPROM !
 137   1             :::::::::::::::::::::::::::::::::::: */
 138   1          #if (PLATFORM_CFG == PLATFORM_04_DMO1611S0)
 139   1          // (04)PLATFORM_04_DMO1611S0 (VID502-002-031,BIT1611BS0)
 140   1      
 141   1          // To turn on DC POWER for EEPROM !
 142   1          MCU_DC_ON;
 143   1          // To ensure DC POWER is stable !
 144   1          TIMER_DelayMS(100);
 145   1          #endif
 146   1      
 147   1      
 148   1          // To read EGD !
 149   1          EEPROM_RxBurst(EGD_ADDR, sizeof(tEGD), (UB8 *)&tsEGD);
 150   1      
 151   1          // To read EYD !
 152   1          EEPROM_RxBurst(EYD_ADDR, sizeof(tEYD), (UB8 *)&tsEYD);
 153   1      
 154   1          // To initiate EEPROM with default-values
 155   1          //  when
 156   1          //      (1) PROJECT CODE doesn't match !
 157   1          //      (2) Both UP and DOWN keys are pressed
 158   1          if ((tsEGD.ulProjectCode != CODE_PROJECT)   ||
 159   1              (KEY_BufferOut() == KEY_UP_DOWN)            )
 160   1          {
 161   2              // To initiate EEPROM with default values
 162   2              EEPROM_Default();
 163   2      
 164   2              // To read EGD !
 165   2              EEPROM_RxBurst(EGD_ADDR, sizeof(tEGD), (UB8 *)&tsEGD);
 166   2      
 167   2              // To read EYD !
 168   2              EEPROM_RxBurst(EYD_ADDR, sizeof(tEYD), (UB8 *)&tsEYD);
 169   2      
 170   2              #ifdef NOT_JUNK
                      tsEGD = tsEGD_Default;
                      tsEYD = tsEYD_Default;
                      #endif
 174   2      
 175   2              LED_YELLOW_BLINK_ON;
 176   2          }
 177   1      
 178   1          #if (PLATFORM_CFG == PLATFORM_04_DMO1611S0)
C51 COMPILER V7.50   POR                                                                   02/05/2007 16:33:25 PAGE 4   

 179   1          // (04)PLATFORM_04_DMO1611S0 (VID502-002-031,BIT1611BS0)
 180   1      
 181   1          // To turn off DC POWER for EEPROM !
 182   1          MCU_DC_OFF;
 183   1          #endif
 184   1      
 185   1      
 186   1      
 187   1          #if (IR_HW_CFG == IR_HW_BIT1611B)
              
                  // To reset VP
                  VP_HardwareReset();
              
                  // To reset VD
                  YUV_HardwareReset();
              
                  /* Initiate VP */
                  VP_Init();
              
                  /* Initiate YUV */
                  YUV_Init();
              

⌨️ 快捷键说明

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