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

📄 rec_display.lst

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 LST
字号:
C51 COMPILER V7.50   REC_DISPLAY                                                           08/18/2008 14:21:06 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE REC_DISPLAY
OBJECT MODULE PLACED IN ..\output\output_bin\output_record\rec_display.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\ap_record\src\rec_display.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR
                    -(..\..\..\bsp\include;..\..\code\ap_record\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dynamic_
                    -load) DEBUG OBJECTEXTEND PRINT(..\output\output_bin\output_record\rec_display.lst) OBJECT(..\output\output_bin\output_re
                    -cord\rec_display.obj)

line level    source

   1          /************************
   2           *   mp3_display.c
   3           ************************/
   4          
   5          #include <string.h>
   6          #include "api.h"
   7          #include "lcd.h"
   8          #include "common.h"
   9          #include "display.h"
  10          #include "file_brower.h"
  11          #include "rec_main.h"
  12          //#include "lrc_parse.h"
  13          #include "rec_display.h"
  14          #include "rec_utile.h"
  15          #include "res.h"
  16          #include "res_show.h"
  17          #include "ap_common.h"
  18          #include "ui_main.h"
  19          #include "prefer.h"
  20          #include "global_user.h"
  21          
  22          #define PROGRESS_Y  24
  23          #define PROGRESS_X  4
  24          #define FILE_NAME_X 2
  25          #define FILE_NAME_Y 95
  26          
  27          INT16U u16TotalMem,u16RemainMem;
  28          
  29          extern void song_timeon(SONGTIME type);
  30          
  31          
  32          void vShowMusicType()
  33          {
  34   1              switch(tUserPreference.rectype)
  35   1              {
  36   2                      case 0:        //wav32k
  37   2                              bResShowPic(RVOR32K, POSITION_A+2, POSITIONY_A);
  38   2                              break;
  39   2                      case 1: 
  40   2                              bResShowPic(RVOR32K, POSITION_A+2, POSITIONY_A);
  41   2                              break;  
  42   2              }   
  43   1      }
  44          
  45          
  46          
  47          
  48          void vShowSequence()
  49          {
  50   1              my_sprintf(_buf,"%03d", curr_music.u16Order);   
  51   1              ui_show_h(_buf,0);
  52   1              my_sprintf(_buf,"%03d",totfile);
C51 COMPILER V7.50   REC_DISPLAY                                                           08/18/2008 14:21:06 PAGE 2   

  53   1              ui_show_h(_buf,1);
  54   1      }
  55          
  56          void vShowTotalTime()
  57          {
  58   1              song_timeon(TIME_TOTAL);
  59   1              ui_show_d(_buf, 1); 
  60   1      }
  61          
  62          void ui_show_rdata(UINT8 *buf, UINT8 x, UINT8 y)
  63          {
  64   1              while(1)
  65   1              {
  66   2                      if(*buf!=0)bResShowPic(RE_0+*buf-0x30, x, y);
  67   2                      else
  68   2                              break;
  69   2                      buf++;
  70   2                      x+=11;
  71   2              }
  72   1      }
  73          
  74          void vShowCurrentTime()
  75          {
  76   1              song_timeon(TIME_PLAY);
  77   1              ui_show_rdata(_buf,40, 80);
  78   1      }
  79          
  80          void vShowRemainTime(UINT16 a)
  81          {
  82   1              //song_timeon(TIME_PLAY);
  83   1              UINT16 temp;
  84   1              
  85   1              temp = a*64;
  86   1              
  87   1              my_sprintf(_buf, "%02d:%02d:%02d",(INT16U)((temp % 3600)), (INT16U)((temp % 3600) / 60), (INT16U)(temp % 
             -60));
  88   1              ui_show_rdata(_buf,10, 30);
  89   1      }
  90          
  91          
  92          void ui_draw(void)
  93          {
  94   1              //shoud show background now
  95   1              bResShowPic(BACKREC1,0,0);
  96   1              //show rectype
  97   1              vShowMusicType();
  98   1              //show music order
  99   1              //vShowSequence();
 100   1              //show file name.
 101   1              gfx_songname();
 102   1              //show total time.
 103   1              //vShowTotalTime();
 104   1              //show current time
 105   1              //vShowCurrentTime();
 106   1              my_sprintf(_buf, "00:00:00");
 107   1              //my_sprintf()
 108   1              //ui_show_d(_buf, 0); 
 109   1              ui_show_rdata(_buf,40, 80);
 110   1              //show progress
 111   1              //gfx_progress(1);
 112   1              //show volume.s
 113   1              //ui_show_vol();
C51 COMPILER V7.50   REC_DISPLAY                                                           08/18/2008 14:21:06 PAGE 3   

 114   1              //show battary
 115   1              ui_show_batt();
 116   1              //show media type
 117   1              bg_color = 0xdf9e;
 118   1              fg_color = COLOR_UNSELECT;      
 119   1              if(my_disk==0)  //sd
 120   1              {
 121   2                      lcd_puts(30,142, "SD",FONTSIZE_HYPER);
 122   2              }
 123   1              else      //nand
 124   1              {
 125   2                      lcd_puts(30,142, "NAND", FONTSIZE_HYPER);
 126   2              }       
 127   1      }
 128          
 129          void play_time_update(void)
 130          {
 131   1              static UINT32 last_time;
 132   1              INT32U data time;
 133   1              
 134   1              time = api_u32GetPlayingTime();
 135   1              if(last_time != time) {
 136   2                      if(curr_screen->id == SCREEN_REC) {
 137   3                              vShowCurrentTime();
 138   3                      //      api_bGetStorageInfo(&u16TotalMem, &u16RemainMem);
 139   3                      //      vShowRemainTime(u16RemainMem);
 140   3                              last_time = api_u32GetPlayingTime();
 141   3                      }
 142   2              }
 143   1      }
 144          void gfx_songname(void)
 145          {
 146   1              bg_color = 0x7000;
 147   1              gfx_set_bg(COLOR_BLACK);
 148   1              //gfx_bg_rectangle(FILE_NAME_X, 95, XRES, 16);  
 149   1              fg_color = COLOR_UNSELECT;
 150   1              /* Draw song file name */
 151   1              //lcd_max_str = 14;
 152   1              if(!api_bGetRecordFileInfo(&curr_finfo))
 153   1                      return;
 154   1              my_sprintf(_buf, "%s.WAV", curr_finfo.pu8FileName);
 155   1              lcd_puts(18, 38, _buf, FONTSIZE_8x16);          
 156   1              //gfx_filename(8, 95);
 157   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    514    ----
   CONSTANT SIZE    =     44    ----
   XDATA SIZE       =      8       7
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       4
   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 + -