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

📄 menu.txt

📁 stm32.rar
💻 TXT
📖 第 1 页 / 共 2 页
字号:
;;;422      /* Set the Text Color */
;;;423      LCD_SetTextColor(Blue);
00000c  201f              MOVS     r0,#0x1f
00000e  f7fffffe          BL       LCD_SetTextColor
;;;424      psMenuItem = &psCurrentMenu->psItems[MenuItemIndex];
000012  4c18              LDR      r4,|L5.116|
;;;425      LCD_DisplayStringLine(((MenuItemIndex + 1) * 24), psMenuItem->pszTitle);
000014  2518              MOVS     r5,#0x18
000016  69a0              LDR      r0,[r4,#0x18]         ;424  ; psCurrentMenu
000018  6841              LDR      r1,[r0,#4]            ;424
00001a  7820              LDRB     r0,[r4,#0]            ;424  ; MenuItemIndex
00001c  eb011100          ADD      r1,r1,r0,LSL #4       ;424
000020  1c40              ADDS     r0,r0,#1
000022  6121              STR      r1,[r4,#0x10]  ; psMenuItem
000024  4368              MULS     r0,r5,r0
000026  6809              LDR      r1,[r1,#0]
000028  b2c0              UXTB     r0,r0
00002a  f7fffffe          BL       LCD_DisplayStringLine
;;;426          
;;;427      /* Test on the MenuItemIndex value before incrementing it */
;;;428      if(MenuItemIndex >= ((psCurrentMenu->nItems)-1))
00002e  69a0              LDR      r0,[r4,#0x18]  ; psCurrentMenu
000030  7a01              LDRB     r1,[r0,#8]
000032  7820              LDRB     r0,[r4,#0]  ; MenuItemIndex
000034  1e49              SUBS     r1,r1,#1
000036  4281              CMP      r1,r0
000038  dc01              BGT      |L5.62|
;;;429      {
;;;430        MenuItemIndex = 0;
00003a  2000              MOVS     r0,#0
00003c  e000              B        |L5.64|
                  |L5.62|
;;;431      }
;;;432      else
;;;433      {
;;;434        MenuItemIndex++;
00003e  1c40              ADDS     r0,r0,#1
                  |L5.64|
000040  7020              STRB     r0,[r4,#0]  ; MenuItemIndex
;;;435      }
;;;436      /* Set the Back Color */
;;;437      LCD_SetBackColor(Green);
000042  f44f60fc          MOV      r0,#0x7e0
000046  f7fffffe          BL       LCD_SetBackColor
;;;438      /* Set the Text Color */
;;;439      LCD_SetTextColor(White);
00004a  4630              MOV      r0,r6
00004c  f7fffffe          BL       LCD_SetTextColor
;;;440      /* Get the current menu */
;;;441      psMenuItem = &(psCurrentMenu->psItems[MenuItemIndex]);
000050  69a0              LDR      r0,[r4,#0x18]  ; psCurrentMenu
000052  6841              LDR      r1,[r0,#4]
000054  7820              LDRB     r0,[r4,#0]  ; MenuItemIndex
000056  eb011100          ADD      r1,r1,r0,LSL #4
;;;442      LCD_DisplayStringLine(((MenuItemIndex + 1) * 24), psMenuItem->pszTitle);
00005a  1c40              ADDS     r0,r0,#1
00005c  6121              STR      r1,[r4,#0x10]  ; psMenuItem
00005e  4368              MULS     r0,r5,r0
000060  6809              LDR      r1,[r1,#0]
000062  b2c0              UXTB     r0,r0
000064  f7fffffe          BL       LCD_DisplayStringLine
;;;443      ItemNumb[nMenuLevel] = MenuItemIndex;
000068  4902              LDR      r1,|L5.116|
00006a  7862              LDRB     r2,[r4,#1]  ; nMenuLevel
00006c  7820              LDRB     r0,[r4,#0]  ; MenuItemIndex
00006e  310c              ADDS     r1,r1,#0xc
000070  5488              STRB     r0,[r1,r2]
;;;444    }
000072  bd70              POP      {r4-r6,pc}
;;;445    
                          ENDP

                  |L5.116|
000074  00000000          DCD      ||.data||

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

                  ReadKey PROC
;;;485    u8 ReadKey(void)
;;;486    {
000000  b570              PUSH     {r4-r6,lr}
;;;487      /* "right" key is pressed */
;;;488      if(!GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_13))
000002  4c2d              LDR      r4,|L6.184|
000004  f44f5500          MOV      r5,#0x2000
000008  4629              MOV      r1,r5
00000a  4620              MOV      r0,r4
00000c  f7fffffe          BL       GPIO_ReadInputDataBit
000010  b938              CBNZ     r0,|L6.34|
                  |L6.18|
;;;489      {
;;;490        while(GPIO_ReadInputDataBit(GPIOG,GPIO_Pin_13) == Bit_RESET)
000012  4629              MOV      r1,r5
000014  4620              MOV      r0,r4
000016  f7fffffe          BL       GPIO_ReadInputDataBit
00001a  2800              CMP      r0,#0
00001c  d0f9              BEQ      |L6.18|
;;;491        {
;;;492        } 
;;;493        return RIGHT; 
00001e  2002              MOVS     r0,#2
;;;494      }	
;;;495      /* "left" key is pressed */
;;;496      if(!GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_14))
;;;497      {
;;;498        while(GPIO_ReadInputDataBit(GPIOG,GPIO_Pin_14) == Bit_RESET)
;;;499        {
;;;500        }
;;;501        return LEFT; 
;;;502      }
;;;503      /* "up" key is pressed */
;;;504      if(!GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_15))
;;;505      {
;;;506        while(GPIO_ReadInputDataBit(GPIOG,GPIO_Pin_15) == Bit_RESET)
;;;507        {
;;;508        }
;;;509        return UP; 
;;;510      }
;;;511      /* "down" key is pressed */
;;;512      if(!GPIO_ReadInputDataBit(GPIOD, GPIO_Pin_3))
;;;513      {
;;;514        while(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_3) == Bit_RESET)
;;;515        {
;;;516        } 
;;;517        return DOWN; 
;;;518      }
;;;519      /* "sel" key is pressed */
;;;520      if(!GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_7))
;;;521      {
;;;522        while(GPIO_ReadInputDataBit(GPIOG,GPIO_Pin_7) == Bit_RESET)
;;;523        {
;;;524        } 
;;;525        return SEL; 
;;;526      }
;;;527      /* "KEY" key is pressed */
;;;528      if(!GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_8))
;;;529      {
;;;530        while(GPIO_ReadInputDataBit(GPIOG,GPIO_Pin_8) == Bit_RESET)
;;;531        {
;;;532        } 
;;;533        return KEY; 
;;;534      }
;;;535      /* No key is pressed */
;;;536      else 
;;;537      {
;;;538        return NOKEY;
;;;539      }
;;;540    }
000020  bd70              POP      {r4-r6,pc}
                  |L6.34|
000022  f44f4580          MOV      r5,#0x4000            ;496
000026  4629              MOV      r1,r5                 ;496
000028  4620              MOV      r0,r4                 ;496
00002a  f7fffffe          BL       GPIO_ReadInputDataBit
00002e  b938              CBNZ     r0,|L6.64|
                  |L6.48|
000030  4629              MOV      r1,r5                 ;498
000032  4620              MOV      r0,r4                 ;498
000034  f7fffffe          BL       GPIO_ReadInputDataBit
000038  2800              CMP      r0,#0                 ;498
00003a  d0f9              BEQ      |L6.48|
00003c  2003              MOVS     r0,#3                 ;501
00003e  bd70              POP      {r4-r6,pc}
                  |L6.64|
000040  f44f4500          MOV      r5,#0x8000            ;504
000044  4629              MOV      r1,r5                 ;504
000046  4620              MOV      r0,r4                 ;504
000048  f7fffffe          BL       GPIO_ReadInputDataBit
00004c  b938              CBNZ     r0,|L6.94|
                  |L6.78|
00004e  4629              MOV      r1,r5                 ;506
000050  4620              MOV      r0,r4                 ;506
000052  f7fffffe          BL       GPIO_ReadInputDataBit
000056  2800              CMP      r0,#0                 ;506
000058  d0f9              BEQ      |L6.78|
00005a  2004              MOVS     r0,#4                 ;509
00005c  bd70              POP      {r4-r6,pc}
                  |L6.94|
00005e  4d17              LDR      r5,|L6.188|
000060  2108              MOVS     r1,#8                 ;512
000062  4628              MOV      r0,r5                 ;512
000064  f7fffffe          BL       GPIO_ReadInputDataBit
000068  b938              CBNZ     r0,|L6.122|
                  |L6.106|
00006a  2108              MOVS     r1,#8                 ;514
00006c  4628              MOV      r0,r5                 ;514
00006e  f7fffffe          BL       GPIO_ReadInputDataBit
000072  2800              CMP      r0,#0                 ;514
000074  d0f9              BEQ      |L6.106|
000076  2005              MOVS     r0,#5                 ;517
000078  bd70              POP      {r4-r6,pc}
                  |L6.122|
00007a  2180              MOVS     r1,#0x80              ;520
00007c  4620              MOV      r0,r4                 ;520
00007e  f7fffffe          BL       GPIO_ReadInputDataBit
000082  b938              CBNZ     r0,|L6.148|
                  |L6.132|
000084  2180              MOVS     r1,#0x80              ;522
000086  4620              MOV      r0,r4                 ;522
000088  f7fffffe          BL       GPIO_ReadInputDataBit
00008c  2800              CMP      r0,#0                 ;522
00008e  d0f9              BEQ      |L6.132|
000090  2001              MOVS     r0,#1                 ;525
000092  bd70              POP      {r4-r6,pc}
                  |L6.148|
000094  f44f7580          MOV      r5,#0x100             ;528
000098  4629              MOV      r1,r5                 ;528
00009a  4620              MOV      r0,r4                 ;528
00009c  f7fffffe          BL       GPIO_ReadInputDataBit
0000a0  b938              CBNZ     r0,|L6.178|
                  |L6.162|
0000a2  4629              MOV      r1,r5                 ;530
0000a4  4620              MOV      r0,r4                 ;530
0000a6  f7fffffe          BL       GPIO_ReadInputDataBit
0000aa  2800              CMP      r0,#0                 ;530
0000ac  d0f9              BEQ      |L6.162|
0000ae  2006              MOVS     r0,#6                 ;533
0000b0  bd70              POP      {r4-r6,pc}
                  |L6.178|
0000b2  2000              MOVS     r0,#0                 ;538
0000b4  bd70              POP      {r4-r6,pc}
;;;541    
                          ENDP

0000b6  0000              DCW      0x0000
                  |L6.184|
0000b8  40012000          DCD      0x40012000
                  |L6.188|
0000bc  40011400          DCD      0x40011400

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

                  LCD_SPIDisplay PROC
;;;1018   void LCD_SPIDisplay(u32 address)
;;;1019   {
000000  e92d4ff1          PUSH     {r0,r4-r11,lr}
000004  4c15              LDR      r4,|L7.92|
000006  b082              SUB      sp,sp,#8
;;;1020     u32 GPIOD_CRL = GPIOD->CRL,  GPIOD_CRH = GPIOD->CRH;
000008  6826              LDR      r6,[r4,#0]
00000a  6867              LDR      r7,[r4,#4]
;;;1021     u32 GPIOE_CRL = GPIOE->CRL,  GPIOE_CRH = GPIOE->CRH;
00000c  f8d48400          LDR      r8,[r4,#0x400]
000010  f8d49404          LDR      r9,[r4,#0x404]
;;;1022     u32 GPIOF_CRL = GPIOF->CRL,  GPIOF_CRH = GPIOF->CRH;
000014  f8d4a800          LDR      r10,[r4,#0x800]
000018  f8d4b804          LDR      r11,[r4,#0x804]
;;;1023     u32 GPIOG_CRL = GPIOG->CRL,  GPIOG_CRH = GPIOG->CRH;
00001c  4d10              LDR      r5,|L7.96|
00001e  6828              LDR      r0,[r5,#0]
000020  9001              STR      r0,[sp,#4]
000022  6868              LDR      r0,[r5,#4]
;;;1024   
;;;1025     /* Write/read to/from FSMC SRAM memory  *************************************/
;;;1026     /* Enable the FSMC Clock */
;;;1027     RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
000024  2101              MOVS     r1,#1
000026  9000              STR      r0,[sp,#0]
000028  0208              LSLS     r0,r1,#8
00002a  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;1028     
;;;1029     /* Configure FSMC Bank1 NOR/SRAM2 */
;;;1030   
;;;1031     /* Slide n

⌨️ 快捷键说明

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