📄 setting_display.lst
字号:
C51 COMPILER V7.50 SETTING_DISPLAY 09/05/2008 09:55:02 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE SETTING_DISPLAY
OBJECT MODULE PLACED IN ..\output\output_bin\output_setting\setting_display.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\ap_setting\src\setting_display.c LARGE OPTIMIZE(9,SIZE) BROWSE I
-NCDIR(..\..\..\bsp\include;..\..\code\ap_setting\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dy
-namic_load) DEBUG OBJECTEXTEND PRINT(..\output\output_bin\output_setting\setting_display.lst) OBJECT(..\output\output_bi
-n\output_setting\setting_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 "setting_main.h"
12 //#include "lrc_parse.h"
13 #include "setting_display.h"
14 #include "setting_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
21 #define PROGRESS_Y 24
22 #define PROGRESS_X 4
23 #define FILE_NAME_X 2
24 #define FILE_NAME_Y 95
25
26 #if 0
extern void song_timeon(SONGTIME type);
void gfx_progress(UINT8 pct)
{
UINT8 i, w, h;
UINT16 pitch;
/* Draw background process bar */
gfx_image(PROGRESS_X,PROGRESS_Y,&image_table[6]);
if(pct > 100)
pct = 100;
else if(pct == 0)
return;
w = ((UINT16)pct * image_table[7].w) / 100;
h = image_table[7].h;
pitch = (UINT16)image_table[7].w << 1;
/* Alignment to even */
w = (w + 1) & (~0x1);
if(!api_bSectionFileSeek(image_table[7].offset, SEEK_SET))
return;
C51 COMPILER V7.50 SETTING_DISPLAY 09/05/2008 09:55:02 PAGE 2
lcd_set_rw_area(PROGRESS_X,PROGRESS_Y, w, h);
/* Draw percentage */
for(i = 0; i < h; i++) {
api_u16SectionFileRead(pixel_buf, pitch);
lcd_put_data((UINT16)pixel_buf, (UINT16)w << 1);
}
}
void vShowMusicType()
{
ui_show_a(MMP3);
}
void vShowBitrate()
{
if(curr_music.eMusicType == MUSIC_TYPE_MP3) //mp3
{
ui_show_a(MMP3);
}
else
{
ui_show_a(MWMA);
}
my_sprintf(_buf, "%03d", curr_music.u16BitRate);
bResShowPic(MBIT0+_buf[0] - 0x30, POSITION_A + 1 + 2,120);
bResShowPic(MBIT0+_buf[1] - 0x30, POSITION_A + 6 + 3,120);
bResShowPic(MBIT0+_buf[2] - 0x30, POSITION_A + 12 + 3,120);
}
void vShowLoop()
{
ui_show_b(tUserPreference.u8RepeatMode+MLOOP1);
}
void vShowEq()
{
ui_show_c(tUserPreference.u8EqMode+MEQICON1);
}
void vShowRepeat()
{
if(api_eGetRepeatMode() == REPEAT_MODE_SETA_OK)
ui_show_a(MRPLNOA);
else if(api_eGetRepeatMode() == REPEAT_MODE_SETAB_OK)
ui_show_a(MRPLNOB);
else
vShowBitrate();
}
void vShowSequence()
{
my_sprintf(_buf, "%03d", curr_music.u16Order);
ui_show_h(_buf,0);
my_sprintf(_buf, "%03d",totfile);
ui_show_h(_buf,1);
}
void vShowTotalTime()
{
song_timeon(TIME_TOTAL);
C51 COMPILER V7.50 SETTING_DISPLAY 09/05/2008 09:55:02 PAGE 3
ui_show_d(_buf, 1);
}
void vShowCurrentTime()
{
song_timeon(TIME_PLAY);
ui_show_d(_buf, 0);
}
void ui_draw(void)
{
//shoud show background now
bResShowPic(BACKMAIN,0,0);
bResShowPic(WWWA001,4,33);
if(!api_bGetCurrMusicInfo(&curr_music))
return;
//show music type.
//vShowMusicType();
vShowBitrate();
//show speaker
ui_show_spk(1);
//show eq type.
vShowEq();
//show loop type
vShowLoop();
//show music order
vShowSequence();
//show file name.
gfx_songname();
//show total time.
vShowTotalTime();
//show current time
vShowCurrentTime();
//show progress
gfx_progress(1);
//show volume.
ui_show_vol();
//show battary
ui_show_batt();
}
void gfx_music_lyrics(UINT8 *str)
{
INT8S data r1;
UINT8 n, y;
gfx_image(8,33,&image_table[8]);
fg_color = COLOR_WHITE;
bg_color = COLOR_BLACK;
r1 = 0;
n = 0;
y = 37;
api_s8GetFont16x16BMP(0, TRUE);
while(*str != '\0') {
if(n >= 12) {
n = 0;
y += 16;
if(y >= (37 + (16 * 3)))
C51 COMPILER V7.50 SETTING_DISPLAY 09/05/2008 09:55:02 PAGE 4
break;
}
if(*str <= 0x80 && r1 != 1) {
if(lcd_putc_8x16(14 + (n * 8), y, *str++))
n++;
continue;
}
else {
r1 = api_s8GetFont16x16BMP(*str++, FALSE);
if(r1 == 0) {
if(lcd_putc_16x16(14 + (n * 8), y, 0))
n += 2;
}
}
}
}
void show_lyrics(UINT8 *str)
{
gfx_music_lyrics(str);
}
void play_time_update(void)
{
}
void gfx_songname(void)
{
bg_color = COLOR_BLACK;
gfx_set_bg(COLOR_BLACK);
gfx_bg_rectangle(FILE_NAME_X, 95, XRES, 16);
fg_color = COLOR_UNSELECT;
/* Draw song file name */
lcd_max_str = 14;
gfx_filename(8, 95);
}
#endif
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
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 + -