📄 get_latin2.lst
字号:
C51 COMPILER V7.50 GET_LATIN2 08/18/2008 13:43:40 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE GET_LATIN2
OBJECT MODULE PLACED IN ..\output\output_bin\output_mp3\get_latin2.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\common\get_latin2.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR(..\..\.
-.\bsp\include;..\..\code\ap_mp3\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dynamic_load) DEBUG
- OBJECTEXTEND PRINT(..\output\output_bin\output_mp3\get_latin2.lst) OBJECT(..\output\output_bin\output_mp3\get_latin2.ob
-j)
line level source
1 /*****************************************
2 * get_latin2.c
3 * this file is get latin font
4 * have 6*8 and 16*16 font
5 * for test
6 ****************************************/
7 #include <string.h>
8 #include "api.h"
9 #include "lcd.h"
10 #include "prefer.h"
11 #include "get_latin2.h"
12 #include "uni_convert.h"
13
14
15
16 BOOLEAN api_bGetLatinFont8x8BMP(INT8U u8char)
17 {
18 1
19 1 if(api_bSectionFileOpen(SYS_FONTBMP_FILEID) == FALSE)
20 1 return FALSE;
21 1
22 1 if(tUserPreference.u8LanguageId==0 || tUserPreference.u8LanguageId==13 || (tUserPreference.u8LanguageId>=
-5 && tUserPreference.u8LanguageId<=11))
23 1 {
24 2 api_bSectionFileSeek((INT32S)u8char*8+L1_OFFSET, SEEK_SET); //拉丁1
25 2 }
26 1 else if(tUserPreference.u8LanguageId==12 || tUserPreference.u8LanguageId==14)
27 1 {
28 2 api_bSectionFileSeek((INT32S)u8char*8+L2_OFFSET, SEEK_SET); //西斯拉夫语
29 2 }
30 1 else if(tUserPreference.u8LanguageId==15)
31 1 {
32 2 api_bSectionFileSeek((INT32S)u8char*8+L3_OFFSET, SEEK_SET); //俄语
33 2 }
34 1 else if(tUserPreference.u8LanguageId == 16)
35 1 {
36 2 api_bSectionFileSeek((INT32S)u8char*8+L4_OFFSET, SEEK_SET); //土耳其文
37 2 }
38 1 //else if(tUserPreference.u8LanguageId == 18)
39 1 //{
40 1 // api_bSectionFileSeek((INT32S)u8char*8+L5_OFFSET, SEEK_SET); //西欧语系
41 1 //}
42 1 api_u16SectionFileRead(BitMapData,8); //get the font bmp
43 1 return TRUE;
44 1 }
45
46 BOOLEAN api_bGetLatinFont8x16BMP(INT8U u8char)
47 {
48 1
49 1 if(api_bSectionFileOpen(SYS_FONTBMP_FILEID) == FALSE)
50 1 return FALSE;
51 1 api_bSectionFileSeek((INT32U)u8char*16+L1_OFFSET+0x800, SEEK_SET);
C51 COMPILER V7.50 GET_LATIN2 08/18/2008 13:43:40 PAGE 2
52 1
53 1 api_u16SectionFileRead(BitMapData,16); //get the font bmp
54 1
55 1 return TRUE;
56 1 }
57
58 #if 0
uni_latin temp[128];
INT16U OneUniToLatin(INT16U unicode) //1252
{
INT16U i;
INT32S tmp_offset;
if(unicode<=0x007f)
return unicode;
else
{
if(api_bSectionFileOpen(SYS_FONTBMP_FILEID) == FALSE)
return FALSE;
if(tUserPreference.u8LanguageId==0 || tUserPreference.u8LanguageId==13 || (tUserPreference.u8LanguageId>
-=5 && tUserPreference.u8LanguageId<=11))
{
tmp_offset = L1_UNIOFFSET;
}
else if(tUserPreference.u8LanguageId==12 || tUserPreference.u8LanguageId==14)
{
tmp_offset = L2_UNIOFFSET;
}
else if(tUserPreference.u8LanguageId==15)
{
tmp_offset = L3_UNIOFFSET;
}
else if(tUserPreference.u8LanguageId == 16)
{
tmp_offset = L4_UNIOFFSET;
}
//else if(tUserPreference.u8LanguageId == 18)
//{
// tmp_offset = L5_UNIOFFSET;
//}
api_bSectionFileSeek((INT32S)tmp_offset, SEEK_SET); //西欧语系
api_u16SectionFileRead(temp,sizeof(uni_latin)*128);
for(i=0;i<128;i++)
{
if(unicode==temp[i].uni_code)
{
return temp[i].latin_code;
}
}
}
return unicode;
}
INT8U unitochar(char *str,int len)
{
INT16U s_cnt=0;
C51 COMPILER V7.50 GET_LATIN2 08/18/2008 13:43:40 PAGE 3
INT16U d_cnt=0;
INT16U _code;
for(d_cnt=0,s_cnt=0;(s_cnt<len)&&((str[s_cnt]!=0)||(str[s_cnt+1]!=0)); )
{
_code = OneUniToLatin(str[s_cnt]+str[s_cnt+1]*0x100);
str[d_cnt++]=_code;
s_cnt+=2;
}
str[d_cnt]=0;
return 1;
}
#endif
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 191 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- 2
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 + -