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

📄 guicharp.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\guicharp.o --depend=.\Obj\guicharp.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\Core\GUICharP.c]
                          THUMB

                          AREA ||i.GUIPROP_DispChar||, CODE, READONLY, ALIGN=2

                  GUIPROP_DispChar PROC
;;;54     */
;;;55     void GUIPROP_DispChar(U16P c) {
000000  e92d43f0          PUSH     {r4-r9,lr}
;;;56       int BytesPerLine;
;;;57       GUI_DRAWMODE DrawMode = GUI_Context.TextMode;
000004  4d2b              LDR      r5,|L1.180|
000006  4604              MOV      r4,r0                 ;55
;;;58       const GUI_FONT_PROP GUI_UNI_PTR * pProp = GUIPROP_FindChar(GUI_Context.pAFont->p.pProp, c);
000008  69a8              LDR      r0,[r5,#0x18]  ; GUI_Context
00000a  b087              SUB      sp,sp,#0x1c           ;55
00000c  f9b5602a          LDRSH    r6,[r5,#0x2a]         ;57  ; GUI_Context
000010  6980              LDR      r0,[r0,#0x18]
000012  4621              MOV      r1,r4
000014  f7fffffe          BL       GUIPROP_FindChar
;;;59       if (pProp) {
000018  2800              CMP      r0,#0
00001a  d048              BEQ      |L1.174|
;;;60         GUI_DRAWMODE OldDrawMode;
;;;61         const GUI_CHARINFO GUI_UNI_PTR * pCharInfo = pProp->paCharInfo+(c-pProp->First);
00001c  6841              LDR      r1,[r0,#4]
00001e  8800              LDRH     r0,[r0,#0]
000020  1a20              SUBS     r0,r4,r0
000022  eb0104c0          ADD      r4,r1,r0,LSL #3
;;;62         BytesPerLine = pCharInfo->BytesPerLine;
000026  78a7              LDRB     r7,[r4,#2]
;;;63         OldDrawMode  = LCD_SetDrawMode(DrawMode);
000028  4630              MOV      r0,r6
00002a  f7fffffe          BL       LCD_SetDrawMode
;;;64         LCD_DrawBitmap( GUI_Context.DispPosX, GUI_Context.DispPosY,
00002e  6862              LDR      r2,[r4,#4]
000030  4681              MOV      r9,r0                 ;63
000032  e9cd7203          STRD     r7,r2,[sp,#0xc]
000036  462b              MOV      r3,r5
000038  2001              MOVS     r0,#1
00003a  9305              STR      r3,[sp,#0x14]
00003c  9002              STR      r0,[sp,#8]
00003e  69a8              LDR      r0,[r5,#0x18]  ; GUI_Context
000040  7dc3              LDRB     r3,[r0,#0x17]
000042  7d82              LDRB     r2,[r0,#0x16]
000044  e9cd2300          STRD     r2,r3,[sp,#0]
000048  7d03              LDRB     r3,[r0,#0x14]
00004a  7822              LDRB     r2,[r4,#0]
00004c  f9b51024          LDRSH    r1,[r5,#0x24]  ; GUI_Context
000050  f9b50022          LDRSH    r0,[r5,#0x22]  ; GUI_Context
000054  f7fffffe          BL       LCD_DrawBitmap
;;;65                            pCharInfo->XSize,
;;;66     											 GUI_Context.pAFont->YSize,
;;;67                            GUI_Context.pAFont->XMag,
;;;68     											 GUI_Context.pAFont->YMag,
;;;69                            1,     /* Bits per Pixel */
;;;70                            BytesPerLine,
;;;71                            pCharInfo->pData,
;;;72                            &LCD_BKCOLORINDEX
;;;73                            );
;;;74         /* Fill empty pixel lines */
;;;75         if (GUI_Context.pAFont->YDist > GUI_Context.pAFont->YSize) {
000058  69a8              LDR      r0,[r5,#0x18]  ; GUI_Context
00005a  7d47              LDRB     r7,[r0,#0x15]
00005c  f8908014          LDRB     r8,[r0,#0x14]
000060  4547              CMP      r7,r8
000062  d919              BLS      |L1.152|
;;;76           int YMag = GUI_Context.pAFont->YMag;
000064  7dc0              LDRB     r0,[r0,#0x17]
;;;77           int YDist = GUI_Context.pAFont->YDist * YMag;
000066  4347              MULS     r7,r0,r7
;;;78           int YSize = GUI_Context.pAFont->YSize * YMag;
000068  fb08f800          MUL      r8,r8,r0
;;;79           if (DrawMode != LCD_DRAWMODE_TRANS) {
00006c  2e02              CMP      r6,#2
00006e  d013              BEQ      |L1.152|
;;;80             LCD_COLOR OldColor = GUI_GetColor();
000070  f7fffffe          BL       GUI_GetColor
000074  4606              MOV      r6,r0
;;;81             GUI_SetColor(GUI_GetBkColor());
000076  f7fffffe          BL       GUI_GetBkColor
00007a  f7fffffe          BL       GUI_SetColor
;;;82             LCD_FillRect(GUI_Context.DispPosX, 
00007e  f9b50022          LDRSH    r0,[r5,#0x22]  ; GUI_Context
000082  7821              LDRB     r1,[r4,#0]
000084  1842              ADDS     r2,r0,r1
000086  f9b51024          LDRSH    r1,[r5,#0x24]  ; GUI_Context
00008a  19cb              ADDS     r3,r1,r7
00008c  4441              ADD      r1,r1,r8
00008e  f7fffffe          BL       LCD_FillRect
;;;83                          GUI_Context.DispPosY + YSize, 
;;;84                          GUI_Context.DispPosX + pCharInfo->XSize, 
;;;85                          GUI_Context.DispPosY + YDist);
;;;86             GUI_SetColor(OldColor);
000092  4630              MOV      r0,r6
000094  f7fffffe          BL       GUI_SetColor
                  |L1.152|
;;;87           }
;;;88         }
;;;89         LCD_SetDrawMode(OldDrawMode); /* Restore draw mode */
000098  4648              MOV      r0,r9
00009a  f7fffffe          BL       LCD_SetDrawMode
;;;90         GUI_Context.DispPosX += pCharInfo->XDist * GUI_Context.pAFont->XMag;
00009e  69aa              LDR      r2,[r5,#0x18]  ; GUI_Context
0000a0  f9b50022          LDRSH    r0,[r5,#0x22]  ; GUI_Context
0000a4  7861              LDRB     r1,[r4,#1]
0000a6  7d92              LDRB     r2,[r2,#0x16]
0000a8  fb010002          MLA      r0,r1,r2,r0
0000ac  8468              STRH     r0,[r5,#0x22]
                  |L1.174|
;;;91       }
;;;92     }
0000ae  b007              ADD      sp,sp,#0x1c
0000b0  e8bd83f0          POP      {r4-r9,pc}
;;;93     
                          ENDP

                  |L1.180|
                          DCD      GUI_Context

                          AREA ||i.GUIPROP_FindChar||, CODE, READONLY, ALIGN=1

                  GUIPROP_FindChar PROC
;;;32     */
;;;33     static const GUI_FONT_PROP GUI_UNI_PTR * GUIPROP_FindChar(const GUI_FONT_PROP GUI_UNI_PTR* pProp, U16P c) {
000000  e006              B        |L2.16|
                  |L2.2|
;;;34       for (; pProp; pProp = pProp->pNext) {
;;;35         if ((c>=pProp->First) && (c<=pProp->Last))
000002  8802              LDRH     r2,[r0,#0]
000004  428a              CMP      r2,r1
000006  d802              BHI      |L2.14|
000008  8842              LDRH     r2,[r0,#2]
00000a  428a              CMP      r2,r1
00000c  d202              BCS      |L2.20|
                  |L2.14|
00000e  6880              LDR      r0,[r0,#8]            ;34
                  |L2.16|
000010  2800              CMP      r0,#0                 ;34
000012  d1f6              BNE      |L2.2|
                  |L2.20|
;;;36           break;
;;;37       }
;;;38       return pProp;
;;;39     }
000014  4770              BX       lr
;;;40     
                          ENDP


                          AREA ||i.GUIPROP_GetCharDistX||, CODE, READONLY, ALIGN=2

                  GUIPROP_GetCharDistX PROC
;;;97     */
;;;98     int GUIPROP_GetCharDistX(U16P c) {
000000  b570              PUSH     {r4-r6,lr}
;;;99       const GUI_FONT_PROP GUI_UNI_PTR * pProp = GUIPROP_FindChar(GUI_Context.pAFont->p.pProp, c);
000002  4c09              LDR      r4,|L3.40|
000004  4605              MOV      r5,r0                 ;98
000006  69a0              LDR      r0,[r4,#0x18]  ; GUI_Context
000008  4629              MOV      r1,r5
00000a  6980              LDR      r0,[r0,#0x18]
00000c  f7fffffe          BL       GUIPROP_FindChar
;;;100      return (pProp) ? (pProp->paCharInfo+(c-pProp->First))->XSize * GUI_Context.pAFont->XMag : 0;
000010  2800              CMP      r0,#0
000012  d007              BEQ      |L3.36|
000014  6841              LDR      r1,[r0,#4]
000016  8800              LDRH     r0,[r0,#0]
000018  69a2              LDR      r2,[r4,#0x18]  ; GUI_Context
00001a  1a28              SUBS     r0,r5,r0
00001c  f8110030          LDRB     r0,[r1,r0,LSL #3]
000020  7d91              LDRB     r1,[r2,#0x16]
000022  4348              MULS     r0,r1,r0
                  |L3.36|
;;;101    }
000024  bd70              POP      {r4-r6,pc}
;;;102    
                          ENDP

000026  0000              DCW      0x0000
                  |L3.40|
                          DCD      GUI_Context

                          AREA ||i.GUIPROP_GetFontInfo||, CODE, READONLY, ALIGN=1

                  GUIPROP_GetFontInfo PROC
;;;106    */
;;;107    void GUIPROP_GetFontInfo(const GUI_FONT GUI_UNI_PTR * pFont, GUI_FONTINFO* pfi) {
000000  2001              MOVS     r0,#1
;;;108      GUI_USE_PARA(pFont);
;;;109      pfi->Flags = GUI_FONTINFO_FLAG_PROP;
000002  8008              STRH     r0,[r1,#0]
;;;110    }
000004  4770              BX       lr
;;;111    
                          ENDP


                          AREA ||i.GUIPROP_IsInFont||, CODE, READONLY, ALIGN=1

                  GUIPROP_IsInFont PROC
;;;115    */
;;;116    char GUIPROP_IsInFont(const GUI_FONT GUI_UNI_PTR * pFont, U16 c) {
000000  b510              PUSH     {r4,lr}
;;;117      const GUI_FONT_PROP GUI_UNI_PTR * pProp = GUIPROP_FindChar(pFont->p.pProp, c);
000002  6980              LDR      r0,[r0,#0x18]
000004  f7fffffe          BL       GUIPROP_FindChar
;;;118      return (pProp==NULL) ? 0 : 1;
000008  2800              CMP      r0,#0
00000a  d000              BEQ      |L5.14|
00000c  2001              MOVS     r0,#1
                  |L5.14|
;;;119    }
00000e  bd10              POP      {r4,pc}
;;;120    
                          ENDP

⌨️ 快捷键说明

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