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

📄 main.lst

📁 epsondriver 驱动源代码
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.06   MAIN                                                                  06/13/2005 12:55:36 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: D:\Keil\C51\BIN\c51.exe main.c DB OE

stmt level    source

   1          /*********************************************************************************************************
             -*
   2                                                                  Sincere Techonlogy
   3                                                                   Shanghai.China
   4                                  (c) Copyright 2005,Sincere Technology,Shanghai China
   5                                                                  All Rights Reserved
   6          
   7          
   8          
   9          File name         : main.c
  10          Author            : Neil(dududu)
  11          Description       : The main function of EpsonDriver 
  12          Target            : C8051F023
  13          Data              : 2005-3
  14          **********************************************************************************************************
             -/
  15          
  16          #include "Include.h"
  17          
  18          unsigned int xdata gammaRed[257]={32,72,72,72,71,70,68,67,65,76,111,208,211,213,215,217,219,243,247,251,25
             -4,272,283,290,293,
  19          296,309,323,329,334,345,351,356,360,365,376,380,384,390,397,402,412,418,424,428,432,437,
  20          444,451,457,463,468,472,475,480,484,488,493,498,504,509,514,519,523,528,532,535,539,543,
  21          547,551,555,559,562,565,568,572,576,579,583,586,588,591,594,598,602,605,607,610,612,615,
  22          617,620,622,625,629,632,636,639,641,644,646,649,651,654,656,659,661,664,666,670,674,677,
  23          680,682,684,686,688,690,693,700,703,707,710,712,715,717,720,723,725,727,729,731,733,735,
  24          738,740,742,744,746,749,752,755,757,759,760,762,763,765,767,770,772,775,777,779,782,785,
  25          787,790,792,793,795,797,798,800,802,804,806,809,812,815,817,819,821,823,825,827,829,831,
  26          833,835,837,839,841,843,845,847,849,851,854,856,858,860,862,864,867,869,871,873,876,878,
  27          880,882,885,887,889,892,894,897,899,901,904,906,909,911,914,917,921,924,927,929,931,932,
  28          934,936,938,941,944,947,951,953,956,958,960,962,965,967,971,975,977,980,983,985,988,990,
  29          993,996,999,1001,1005,1009,1013,1017,1023,1024},
  30          gammaGreen[257]={100,126,126,127,128,129,130,132,135,137,141,144,148,152,157,162,
  31          168,174,180,187,195,202,210,217,221,234,240,245,252,261,266,270,
  32          275,279,285,291,299,305,310,320,326,330,333,336,340,345,351,356,
  33          361,366,370,375,381,386,391,396,402,407,411,416,421,426,432,435,
  34          438,441,444,448,451,454,457,461,465,469,472,476,479,482,484,487,
  35          489,493,498,502,505,509,512,516,519,521,524,526,528,531,534,537,
  36          540,543,546,549,553,556,559,561,564,566,569,572,574,577,579,582,
  37          584,586,589,591,594,597,599,602,605,607,610,614,619,624,627,629,
  38          632,634,636,639,642,646,648,650,653,655,658,660,662,664,667,669,
  39          671,673,675,678,680,682,684,685,687,689,692,695,698,702,704,706,
  40          709,713,716,719,721,723,726,728,730,732,734,737,739,741,744,746,
  41          748,751,753,756,759,763,766,768,770,773,776,780,783,785,788,790,
  42          793,795,797,800,802,804,807,809,811,814,816,819,821,824,826,829,
  43          831,834,837,841,845,848,850,853,856,858,861,864,867,869,872,875,
  44          878,880,883,888,892,896,899,903,906,909,913,916,919,923,928,933,
  45          937,941,945,950,954,959,966,971,977,981,985,989,996,1005,1013,
  46          1023,1024},
  47          gammaBlue[257]={60,163,161,156,150,142,131,121,125,133,137,138,140,
  48          142,144,146,148,151,153,155,157,159,161,164,167,
  49          171,175,179,183,185,188,190,192,196,200,204,207,
  50          211,215,219,223,226,230,233,236,240,244,249,253,
  51          256,258,261,263,266,270,273,277,280,284,288,294,
  52          298,302,305,309,313,316,318,321,324,328,336,341,
C51 COMPILER V7.06   MAIN                                                                  06/13/2005 12:55:36 PAGE 2   

  53          345,350,356,361,367,372,378,384,392,397,400,404,
  54          422,430,436,443,454,460,465,472,478,483,488,494,
  55          501,507,511,515,518,523,527,531,535,539,542,545,
  56          548,551,554,557,560,564,567,570,573,576,579,581,
  57          584,586,588,590,593,596,599,602,605,607,609,611,
  58          614,617,620,623,625,627,629,632,634,637,639,641,
  59          644,646,649,652,654,656,658,660,663,665,667,669,
  60          671,673,676,680,683,685,687,688,690,692,694,697,
  61          701,704,707,709,712,714,717,719,721,724,726,728,
  62          731,733,735,737,739,741,744,746,748,750,752,755,
  63          757,759,761,763,766,768,770,774,778,782,785,788,
  64          791,793,795,798,801,805,808,811,814,817,820,824,
  65          828,832,834,837,839,842,846,851,856,859,862,865,
  66          868,870,873,876,880,886,890,894,897,902,910,916,
  67          922,928,933,939,945,951,957,963,972,979,986,998,
  68          1006,1013,1023,1024};
  69          
  70          
  71          void main(void)
  72          {
  73   1              int i,n;
  74   1              unsigned char Selection;
  75   1              WDTCN = 0xde;                       
  76   1          WDTCN = 0xad;                       // Disable watchdog timer
  77   1              SYSCLK_Init ();                     // Initialize oscillator
  78   1              MEMORY_Init ();                     // Initialize memory
  79   1              PERIAL_Init ();                                         // Initialize digital peripherals
  80   1              PORT_Init ();
  81   1              INTERRUPT_Init ();
  82   1              SMBUS_Init ();
  83   1              UART0_Init ();
  84   1              NONE_READY();
  85   1              /*
  86   1              _0707READY();
  87   1              WRITE_0707(0x0c03,0x0009);
  88   1              NONE_READY();
  89   1              _0707READY();
  90   1              WRITE_0707(0x0c04,0x0020);
  91   1              NONE_READY();
  92   1              _R6100READY() ;                //Ready for red 6100
  93   1              WRITE_6100(0x0880);
  94   1              NONE_READY();
  95   1              _B6100READY() ;
  96   1              WRITE_6100(0x0880);
  97   1              NONE_READY();
  98   1              */
  99   1              SetTG ();
 100   1      /*
 101   1              n=0;
 102   1              for(i=0;i<=256;i++)
 103   1                      {
 104   1                              _0707READY();
 105   1                              WRITE_0707(n,gammaRed[i]);
 106   1                              n++;
 107   1                              NONE_READY();
 108   1                      }
 109   1      
 110   1              n=0;
 111   1              for(i=0;i<=256;i++)
 112   1                      {
 113   1                              _0707READY();
 114   1                              WRITE_0707((1024+n),gammaGreen[i]);
C51 COMPILER V7.06   MAIN                                                                  06/13/2005 12:55:36 PAGE 3   

 115   1                              n++;
 116   1                              NONE_READY();
 117   1                      }
 118   1      
 119   1              n=0;
 120   1              for(i=0;i<=256;i++)
 121   1                      {
 122   1                              _0707READY();
 123   1                              WRITE_0707((2048+n),gammaBlue[i]);
 124   1                              n++;
 125   1                              NONE_READY();
 126   1                      }
 127   1      */
 128   1              /*SMBus communication*****************
 129   1              while(1)
 130   1              {
 131   1                      SM_Send (_24LC256, 0x0011, 0x38);
 132   1                      DELAY (100);
 133   1                      rece_SMBus=SM_Receive (_24LC256, 0x0011);
 134   1      
 135   1              }*********************************/
 136   1              
 137   1              
 138   1              /*URAT0 communication*****************
 139   1              while(1)
 140   1              {
 141   1                      pointer=sRecComBuf;

⌨️ 快捷键说明

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