📄 get_latin2.lst
字号:
C51 COMPILER V7.50 GET_LATIN2 07/17/2008 14:38:50 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE GET_LATIN2
OBJECT MODULE PLACED IN ..\output\get_latin2.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\common\get_latin2.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR(..\..\..\bsp
-\include;..\src\include;..\..\include) DEFINE(CONFIG_ASIC) DEBUG OBJECTEXTEND PRINT(.\get_latin2.lst) OBJECT(..\output\g
-et_latin2.obj)
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"
*** WARNING C318 IN LINE 8 OF ..\..\common\get_latin2.c: can't open file 'api.h'
9 #include "lcd.h"
*** ERROR C129 IN LINE 102 OF ..\..\INCLUDE\LCD.H: missing ';' before 'lcd_max_str'
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
19 if(api_bSectionFileOpen(SYS_FONTBMP_FILEID) == FALSE)
20 return FALSE;
21
22 if(tUserPreference.u8LanguageId==0 || tUserPreference.u8LanguageId==13 || (tUserPreference.u8LanguageId>=
-5 && tUserPreference.u8LanguageId<=11))
23 {
24 api_bSectionFileSeek((INT32S)u8char*8+L1_OFFSET, SEEK_SET); //拉丁1
25 }
26 else if(tUserPreference.u8LanguageId==12 || tUserPreference.u8LanguageId==14)
27 {
28 api_bSectionFileSeek((INT32S)u8char*8+L2_OFFSET, SEEK_SET); //西斯拉夫语
29 }
30 else if(tUserPreference.u8LanguageId==15)
31 {
32 api_bSectionFileSeek((INT32S)u8char*8+L3_OFFSET, SEEK_SET); //俄语
33 }
34 else if(tUserPreference.u8LanguageId == 16)
35 {
36 api_bSectionFileSeek((INT32S)u8char*8+L4_OFFSET, SEEK_SET); //土耳其文
37 }
38 //else if(tUserPreference.u8LanguageId == 18)
39 //{
40 // api_bSectionFileSeek((INT32S)u8char*8+L5_OFFSET, SEEK_SET); //西欧语系
41 //}
42 api_u16SectionFileRead(BitMapData,8); //get the font bmp
43 return TRUE;
44 }
45
46 BOOLEAN api_bGetLatinFont8x16BMP(INT8U u8char)
47 {
48
49 if(api_bSectionFileOpen(SYS_FONTBMP_FILEID) == FALSE)
50 return FALSE;
C51 COMPILER V7.50 GET_LATIN2 07/17/2008 14:38:50 PAGE 2
51 api_bSectionFileSeek((INT32U)u8char*16+L1_OFFSET+0x800, SEEK_SET);
52
53 api_u16SectionFileRead(BitMapData,16); //get the font bmp
54
55 return TRUE;
56 }
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)
{
C51 COMPILER V7.50 GET_LATIN2 07/17/2008 14:38:50 PAGE 3
INT16U s_cnt=0;
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
C51 COMPILATION COMPLETE. 1 WARNING(S), 1 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -