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

📄 waveplayer.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 4 页
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\waveplayer.o --depend=.\Obj\waveplayer.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 ..\..\source\waveplayer.c]
                          THUMB

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

                  I2S_CODEC_LCDConfig PROC
;;;511    *******************************************************************************/
;;;512    void I2S_CODEC_LCDConfig(void)
000000  b510              PUSH     {r4,lr}
;;;513    {
;;;514      /* Set the text and the background color */
;;;515      LCD_SetBackColor(Blue);
000002  201f              MOVS     r0,#0x1f
000004  f7fffffe          BL       LCD_SetBackColor
;;;516      LCD_SetTextColor(Black);
000008  2000              MOVS     r0,#0
00000a  f7fffffe          BL       LCD_SetTextColor
;;;517      LCD_Clear(White);
00000e  f64f70ff          MOV      r0,#0xffff
000012  f7fffffe          BL       LCD_Clear
;;;518    
;;;519      /* Display the Titles */  
;;;520      LCD_DisplayStringLine(Line0, DemoTitle);
000016  4905              LDR      r1,|L1.44|
000018  2000              MOVS     r0,#0
00001a  f7fffffe          BL       LCD_DisplayStringLine
;;;521      LCD_DisplayStringLine(Line2, CmdTitle0); 
00001e  4903              LDR      r1,|L1.44|
000020  e8bd4010          POP      {r4,lr}
000024  3114              ADDS     r1,r1,#0x14
000026  2030              MOVS     r0,#0x30
000028  f7ffbffe          B.W      LCD_DisplayStringLine
;;;522    }
;;;523    
                          ENDP

                  |L1.44|
                          DCD      ||.data||+0x1

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

                  LCD_DisplayError PROC
;;;462    *******************************************************************************/
;;;463    void LCD_DisplayError(u32 err)
000000  b570              PUSH     {r4-r6,lr}
;;;464    {
000002  4604              MOV      r4,r0
;;;465      I2S_CODEC_LCDConfig();
000004  f7fffffe          BL       I2S_CODEC_LCDConfig
;;;466    
;;;467      /* Enable the FSMC that share a pin w/ I2C1 (LBAR) */
;;;468      RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
000008  2101              MOVS     r1,#1
00000a  020d              LSLS     r5,r1,#8
00000c  4628              MOV      r0,r5
00000e  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;469    
;;;470      LCD_SetTextColor(Red); 
000012  f44f4078          MOV      r0,#0xf800
000016  f7fffffe          BL       LCD_SetTextColor
;;;471    
;;;472      /* Clear the LCD */
;;;473      LCD_Clear(White);
00001a  f64f70ff          MOV      r0,#0xffff
00001e  f7fffffe          BL       LCD_Clear
;;;474    
;;;475    
;;;476      /* The memory initialazation failed */
;;;477      if (err == 1)
000022  2c01              CMP      r4,#1
000024  d101              BNE      |L2.42|
;;;478      {
;;;479        LCD_DisplayStringLine(Line7, memerr); 
000026  4910              LDR      r1,|L2.104|
000028  e003              B        |L2.50|
                  |L2.42|
;;;480      }
;;;481    
;;;482      /* The audio file initialization failed (wrong audio format or wrong file) */
;;;483      if (err == 2)
00002a  2c02              CMP      r4,#2
00002c  d105              BNE      |L2.58|
;;;484      {
;;;485        LCD_DisplayStringLine(Line7, fileerr); 
00002e  490e              LDR      r1,|L2.104|
000030  3114              ADDS     r1,r1,#0x14
                  |L2.50|
000032  20a8              MOVS     r0,#0xa8              ;479
000034  f7fffffe          BL       LCD_DisplayStringLine
000038  e004              B        |L2.68|
                  |L2.58|
;;;486      }
;;;487    
;;;488      /* I2C communication failure occured */
;;;489      if (err == 3)
00003a  2c03              CMP      r4,#3
00003c  d102              BNE      |L2.68|
;;;490      {
;;;491        LCD_DisplayStringLine(Line7, i2cerr); 
00003e  490a              LDR      r1,|L2.104|
000040  3914              SUBS     r1,r1,#0x14
000042  e7f6              B        |L2.50|
                  |L2.68|
;;;492      }
;;;493    
;;;494      LCD_DisplayStringLine(Line8, "Push JoyStick to    ");
000044  a109              ADR      r1,|L2.108|
000046  20c0              MOVS     r0,#0xc0
000048  f7fffffe          BL       LCD_DisplayStringLine
;;;495      LCD_DisplayStringLine(Line9, "exit.               ");
00004c  a10d              ADR      r1,|L2.132|
00004e  20d8              MOVS     r0,#0xd8
000050  f7fffffe          BL       LCD_DisplayStringLine
;;;496    
;;;497      /* Disable the FSMC that share a pin w/ I2C1 (LBAR) */
;;;498      RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, DISABLE);
000054  2100              MOVS     r1,#0
000056  4628              MOV      r0,r5
000058  f7fffffe          BL       RCC_AHBPeriphClockCmd
                  |L2.92|
;;;499    
;;;500      while(ReadKey() == NOKEY)
00005c  f7fffffe          BL       ReadKey
000060  2800              CMP      r0,#0
000062  d0fb              BEQ      |L2.92|
;;;501      {
;;;502      }
;;;503    }
000064  bd70              POP      {r4-r6,pc}
;;;504    
                          ENDP

000066  0000              DCW      0x0000
                  |L2.104|
                          DCD      ||.data||+0xf1
                  |L2.108|
00006c  50757368204a6f79537469636b20746f2020202000        DCB      "Push JoyStick to    ",0
000081  00                DCB      0
000082  00                DCB      0
000083  00                DCB      0
                  |L2.132|
000084  657869742e20202020202020202020202020202000        DCB      "exit.               ",0
000099  00                DCB      0
00009a  00                DCB      0
00009b  00                DCB      0

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

                  LCD_Update PROC
;;;331    *******************************************************************************/
;;;332    void LCD_Update(u32 Status)
000000  e92d5ff0          PUSH     {r4-r12,lr}
;;;333    {
000004  4605              MOV      r5,r0
;;;334      u8 tmp = 0;
;;;335      u32 counter = 0;
;;;336    
;;;337      /* Enable the FSMC that share a pin w/ I2C1 (LBAR) */
;;;338      RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
000006  f44f7980          MOV      r9,#0x100
00000a  2400              MOVS     r4,#0                 ;335
00000c  2101              MOVS     r1,#1
00000e  4648              MOV      r0,r9
000010  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;339    
;;;340      switch (Status)
;;;341      {
;;;342       case PROGRESS:
;;;343             tmp = (u8) ((u32)((GetVar_AudioDataIndex()) * 100) / GetVar_AudioDataLength());
;;;344             if (tmp == 0)
;;;345             { 
;;;346               LCD_SetTextColor(Magenta);
;;;347               LCD_ClearLine(Line8);
;;;348               LCD_DrawRect(Line8, 310, 16, 300);
;;;349             }
;;;350             else
;;;351             {
;;;352               LCD_SetTextColor(Magenta);
;;;353               LCD_DrawLine(Line8, 310 - (tmp * 3), 16, Vertical);
;;;354             }         
;;;355             break;
;;;356       case FRWD:
;;;357             tmp = (u8) ((u32)((GetVar_AudioDataIndex()) * 100) / GetVar_AudioDataLength());
;;;358    
;;;359             LCD_SetTextColor(Magenta);
;;;360             LCD_ClearLine(Line8);
;;;361             LCD_DrawRect(Line8, 310, 16, 300);
;;;362             LCD_SetTextColor(Magenta);
;;;363    
;;;364             for (counter = 0; counter <= tmp; counter++)
;;;365             {
;;;366               LCD_DrawLine(Line8, 310 - (counter * 3), 16, Vertical);
;;;367             }          
;;;368             break;
;;;369       case STOP:
;;;370             /* Display the stopped status menu */ 
;;;371             LCD_SetTextColor(White); 
000014  f64f76ff          MOV      r6,#0xffff
000018  f44f5780          MOV      r7,#0x1000            ;340
00001c  f1b57f80          CMP      r5,#0x1000000         ;340
000020  d07e              BEQ      |L3.288|
000022  dc22              BGT      |L3.106|
000024  f64f081f          MOV      r8,#0xf81f            ;346
000028  f44f7a96          MOV      r10,#0x12c            ;348
00002c  f44f7b9b          MOV      r11,#0x136            ;348
000030  454d              CMP      r5,r9                 ;340
000032  d05d              BEQ      |L3.240|
000034  42bd              CMP      r5,r7                 ;340
000036  d034              BEQ      |L3.162|
000038  f5b51f80          CMP      r5,#0x100000          ;340
00003c  d114              BNE      |L3.104|
;;;372             LCD_DisplayStringLine(Line3, CmdTitle1Stopped);
;;;373             LCD_DisplayStringLine(Line4, CmdTitle2Stopped);
;;;374             LCD_SetTextColor(Red);
;;;375             LCD_DisplayStringLine(Line6, StatusTitleStopped);
;;;376             LCD_ClearLine(Line9);
;;;377             LCD_SetTextColor(Black);
;;;378             LCD_DisplayChar(Line9, 250, 'v'); 
;;;379             LCD_DisplayChar(Line9, 235, 'o'); 
;;;380             LCD_DisplayChar(Line9, 220, 'l'); 
;;;381             LCD_DisplayChar(Line9, 200, '-'); 
;;;382             LCD_DisplayChar(Line9, 85, '+'); 
;;;383             LCD_DrawRect(Line9 + 8, 185, 10, 100); 
;;;384             break; 
;;;385       case PAUSE: 
;;;386             /* Display the paused status menu */ 
;;;387             LCD_SetTextColor(White);
00003e  4630              MOV      r0,r6
000040  f7fffffe          BL       LCD_SetTextColor
;;;388             LCD_DisplayStringLine(Line3, CmdTitle1Paused);
000044  4981              LDR      r1,|L3.588|
000046  2048              MOVS     r0,#0x48
000048  f7fffffe          BL       LCD_DisplayStringLine
;;;389             LCD_DisplayStringLine(Line4, CmdTitle2Paused);
00004c  497f              LDR      r1,|L3.588|
00004e  2060              MOVS     r0,#0x60
000050  3114              ADDS     r1,r1,#0x14
000052  f7fffffe          BL       LCD_DisplayStringLine
;;;390             LCD_SetTextColor(Red);
000056  f44f4078          MOV      r0,#0xf800
00005a  f7fffffe          BL       LCD_SetTextColor
;;;391             LCD_DisplayStringLine(Line6, StatusTitlePaused);
00005e  497b              LDR      r1,|L3.588|
000060  2090              MOVS     r0,#0x90
000062  3178              ADDS     r1,r1,#0x78
000064  f7fffffe          BL       LCD_DisplayStringLine
                  |L3.104|
;;;392             break;
000068  e06b              B        |L3.322|
                  |L3.106|
00006a  f1b55f80          CMP      r5,#0x10000000        ;340
00006e  d004              BEQ      |L3.122|
000070  4877              LDR      r0,|L3.592|
000072  1828              ADDS     r0,r5,r0              ;340
000074  d165              BNE      |L3.322|
;;;393       case PLAY:
;;;394             /* Display the Titles */   
;;;395             LCD_SetTextColor(Black);
;;;396             LCD_DisplayStringLine(Line0, DemoTitle);
;;;397             LCD_DisplayStringLine(Line2, CmdTitle0); 
;;;398    
;;;399             /* Display the Playing status menu */ 
;;;400             LCD_SetTextColor(White);
;;;401             LCD_DisplayStringLine(Line3, CmdTitle1Playing);
;;;402             LCD_DisplayStringLine(Line4, CmdTitle2Playing);

⌨️ 快捷键说明

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