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

📄 lcd.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 3 页
字号:

                  LCD_Index2Color PROC
;;;322    */
;;;323    LCD_COLOR LCD_Index2Color(int Index) {
000000  4901              LDR      r1,|L6.8|
;;;324      return LCDDEV_L0_Index2Color(Index);
000002  6c89              LDR      r1,[r1,#0x48]  ; GUI_Context
000004  6849              LDR      r1,[r1,#4]
000006  4708              BX       r1
;;;325    }
;;;326    
                          ENDP

                  |L6.8|
                          DCD      GUI_Context

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

                  LCD_Init PROC
;;;271    */
;;;272    int LCD_Init(void) {
000000  b510              PUSH     {r4,lr}
;;;273      int r = 0;
;;;274      GUI_DEBUG_LOG("\nLCD_Init...");
;;;275      LCD_SetClipRectMax();
000002  f7fffffe          BL       LCD_SetClipRectMax
;;;276      r |= LCD_L0_Init();
000006  f7fffffe          BL       LCD_L0_Init
00000a  4604              MOV      r4,r0
;;;277      #if GUI_NUM_LAYERS > 1
;;;278        r |= LCD_L0_1_Init();
;;;279      #endif
;;;280      #if GUI_NUM_LAYERS > 2
;;;281        r |= LCD_L0_2_Init();
;;;282      #endif
;;;283      #if GUI_NUM_LAYERS > 3
;;;284        r |= LCD_L0_3_Init();
;;;285      #endif
;;;286      #if GUI_NUM_LAYERS > 4
;;;287        r |= LCD_L0_4_Init();
;;;288      #endif
;;;289      LCD_InitLUT();
00000c  f7fffffe          BL       LCD_InitLUT
;;;290      {
;;;291      #if GUI_NUM_LAYERS > 1
;;;292        int i;
;;;293        for (i = GUI_NUM_LAYERS - 1; i >= 0; i--) {
;;;294          GUI_SelectLayer(i);
;;;295      #else
;;;296        {
;;;297      #endif
;;;298          #if (GUI_DEFAULT_BKCOLOR != GUI_INVALID_COLOR)
;;;299            /* Clear video memory */
;;;300            LCD_SetDrawMode(GUI_DRAWMODE_REV);
000010  2004              MOVS     r0,#4
000012  f7fffffe          BL       LCD_SetDrawMode
;;;301            LCD_FillRect(0,0, GUI_XMAX, GUI_YMAX);
000016  f64072ff          MOV      r2,#0xfff
00001a  2100              MOVS     r1,#0
00001c  4613              MOV      r3,r2
00001e  4608              MOV      r0,r1
000020  f7fffffe          BL       LCD_FillRect
;;;302            LCD_SetDrawMode(0);
000024  2000              MOVS     r0,#0
000026  f7fffffe          BL       LCD_SetDrawMode
;;;303          #endif
;;;304        }
;;;305      }
;;;306      /* Switch LCD on */
;;;307      LCD_On();
00002a  f7fffffe          BL       LCD_L0_On
;;;308      return r;
00002e  4620              MOV      r0,r4
;;;309    }
000030  bd10              POP      {r4,pc}
;;;310    
                          ENDP


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

                  LCD_SetBkColor PROC
;;;330    */
;;;331    void LCD_SetBkColor(GUI_COLOR color) {
000000  b510              PUSH     {r4,lr}
;;;332      if (GUI_Context.BkColor != color) {
000002  4906              LDR      r1,|L8.28|
000004  6b4a              LDR      r2,[r1,#0x34]  ; GUI_Context
000006  4282              CMP      r2,r0
000008  d006              BEQ      |L8.24|
;;;333        GUI_Context.BkColor = color;
;;;334        LCD_SetBkColorIndex(LCD_Color2Index(color));
00000a  6348              STR      r0,[r1,#0x34]  ; GUI_Context
00000c  f7fffffe          BL       LCD_Color2Index
000010  e8bd4010          POP      {r4,lr}
000014  f7ffbffe          B.W      LCD_SetBkColorIndex
                  |L8.24|
;;;335      }
;;;336    }
000018  bd10              POP      {r4,pc}
;;;337    
                          ENDP

00001a  0000              DCW      0x0000
                  |L8.28|
                          DCD      GUI_Context

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

                  LCD_SetBkColorIndex PROC
;;;82     */
;;;83     void LCD_SetBkColorIndex(int Index) {
000000  b510              PUSH     {r4,lr}
000002  4604              MOV      r4,r0
;;;84       LCD_ACOLORINDEX[_GetColorIndex(0)] = Index;
000004  2000              MOVS     r0,#0
000006  f7fffffe          BL       _GetColorIndex
00000a  4902              LDR      r1,|L9.20|
00000c  f8214010          STRH     r4,[r1,r0,LSL #1]
;;;85     }
000010  bd10              POP      {r4,pc}
;;;86     
                          ENDP

000012  0000              DCW      0x0000
                  |L9.20|
                          DCD      GUI_Context

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

                  LCD_SetClipRectMax PROC
;;;263    */
;;;264    void LCD_SetClipRectMax(void) {
000000  4802              LDR      r0,|L10.12|
;;;265      LCDDEV_L0_GetRect(&GUI_Context.ClipRect);
000002  6c81              LDR      r1,[r0,#0x48]  ; GUI_Context
000004  1d00              ADDS     r0,r0,#4
000006  6a09              LDR      r1,[r1,#0x20]
000008  4708              BX       r1
;;;266    }
;;;267    
                          ENDP

00000a  0000              DCW      0x0000
                  |L10.12|
                          DCD      GUI_Context

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

                  LCD_SetColor PROC
;;;341    */
;;;342    void LCD_SetColor(GUI_COLOR color) {
000000  b510              PUSH     {r4,lr}
;;;343      if (GUI_Context.Color != color) {
000002  4906              LDR      r1,|L11.28|
000004  6b0a              LDR      r2,[r1,#0x30]  ; GUI_Context
000006  4282              CMP      r2,r0
000008  d006              BEQ      |L11.24|
;;;344        GUI_Context.Color = color;
;;;345        LCD_SetColorIndex(LCD_Color2Index(color));
00000a  6308              STR      r0,[r1,#0x30]  ; GUI_Context
00000c  f7fffffe          BL       LCD_Color2Index
000010  e8bd4010          POP      {r4,lr}
000014  f7ffbffe          B.W      LCD_SetColorIndex
                  |L11.24|
;;;346      }
;;;347    }
000018  bd10              POP      {r4,pc}
;;;348    
                          ENDP

00001a  0000              DCW      0x0000
                  |L11.28|
                          DCD      GUI_Context

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

                  LCD_SetColorIndex PROC
;;;74     */
;;;75     void LCD_SetColorIndex(int Index) {
000000  b510              PUSH     {r4,lr}
000002  4604              MOV      r4,r0
;;;76       LCD_ACOLORINDEX[_GetColorIndex(1)] = Index;
000004  2001              MOVS     r0,#1
000006  f7fffffe          BL       _GetColorIndex
00000a  4902              LDR      r1,|L12.20|
00000c  f8214010          STRH     r4,[r1,r0,LSL #1]
;;;77     }
000010  bd10              POP      {r4,pc}
;;;78     
                          ENDP

000012  0000              DCW      0x0000
                  |L12.20|
                          DCD      GUI_Context

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

                  LCD_SetDrawMode PROC
;;;90     */
;;;91     LCD_DRAWMODE LCD_SetDrawMode(LCD_DRAWMODE dm) {
000000  b510              PUSH     {r4,lr}
;;;92       LCD_DRAWMODE OldDM = GUI_Context.DrawMode;
000002  4906              LDR      r1,|L13.28|
000004  4602              MOV      r2,r0                 ;91
000006  7b08              LDRB     r0,[r1,#0xc]  ; GUI_Context
;;;93       if ((GUI_Context.DrawMode^dm) & LCD_DRAWMODE_REV) {
000008  ea800302          EOR      r3,r0,r2
00000c  075b              LSLS     r3,r3,#29
00000e  d503              BPL      |L13.24|
;;;94         LCD_PIXELINDEX temp = LCD_BKCOLORINDEX;
000010  880b              LDRH     r3,[r1,#0]  ; GUI_Context
;;;95         LCD_BKCOLORINDEX    = LCD_COLORINDEX;
000012  884c              LDRH     r4,[r1,#2]  ; GUI_Context
000014  800c              STRH     r4,[r1,#0]
;;;96         LCD_COLORINDEX = temp;
000016  804b              STRH     r3,[r1,#2]
                  |L13.24|
;;;97       }
;;;98       GUI_Context.DrawMode = dm;
000018  730a              STRB     r2,[r1,#0xc]
;;;99       return OldDM;
;;;100    }
00001a  bd10              POP      {r4,pc}
;;;101    
                          ENDP

                  |L13.28|
                          DCD      GUI_Context

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

                  _GetColorIndex PROC
;;;60     */
;;;61     static int _GetColorIndex(int i)  /* i is 0 or 1 */ {
000000  4a03              LDR      r2,|L14.16|
000002  4601              MOV      r1,r0
;;;62       return  (GUI_Context.DrawMode & LCD_DRAWMODE_REV) ? i-1 : i;
000004  7b12              LDRB     r2,[r2,#0xc]  ; GUI_Context
000006  1e40              SUBS     r0,r0,#1
000008  0752              LSLS     r2,r2,#29
00000a  d400              BMI      |L14.14|
00000c  4608              MOV      r0,r1
                  |L14.14|
;;;63     }
00000e  4770              BX       lr
;;;64     
                          ENDP

                  |L14.16|
                          DCD      GUI_Context

⌨️ 快捷键说明

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