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

📄 waveplayer.txt

📁 stm32.rar
💻 TXT
📖 第 1 页 / 共 4 页
字号:
;;;254    
;;;255        /* If "SEL" pushbutton is pressed */
;;;256        if(MyKey == SEL)
0000ee  2c01              CMP      r4,#1
0000f0  d119              BNE      |L4.294|
;;;257        {
;;;258          /* Mask All Interrupts */
;;;259          NVIC_SETPRIMASK();
0000f2  f7fffffe          BL       NVIC_SETPRIMASK
;;;260    
;;;261          /* Update the display information */
;;;262          LCD_Update(STOP);
0000f6  0720              LSLS     r0,r4,#28
0000f8  f7fffffe          BL       LCD_Update
;;;263    
;;;264          /* Command the Stop of the current audio stream */
;;;265          SetVar_AudioPlayStatus(AudioPlayStatus_STOPPED);
0000fc  2000              MOVS     r0,#0
0000fe  f7fffffe          BL       SetVar_AudioPlayStatus
;;;266    
;;;267          /* Disable mask of all interrupts */
;;;268          NVIC_RESETPRIMASK();
000102  f7fffffe          BL       NVIC_RESETPRIMASK
;;;269    
;;;270    #if STM3210E
;;;271          I2S_CODEC_Stop();
;;;272          SPI_I2S_ITConfig(SPI2, SPI_I2S_IT_TXE, DISABLE);
;;;273    #else
;;;274          DAC_CODEC_Stop();
000106  f7fffffe          BL       DAC_CODEC_Stop
;;;275    #endif
;;;276    
;;;277          /* Enable the FSMC that share a pin w/ I2C1 (LBAR) */
;;;278          RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
00010a  2101              MOVS     r1,#1
00010c  4648              MOV      r0,r9
00010e  f7fffffe          BL       RCC_AHBPeriphClockCmd
;;;279    
;;;280          /* Clear the LCD */
;;;281          LCD_Clear(White);
000112  4638              MOV      r0,r7
000114  f7fffffe          BL       LCD_Clear
;;;282    
;;;283          /* Display the previous menu */
;;;284          DisplayMenu();
000118  f7fffffe          BL       DisplayMenu
                  |L4.284|
;;;285          /* Enable the JoyStick interrupts */
;;;286          IntExtOnOffConfig(ENABLE); 
;;;287          return;     
;;;288        }
;;;289        /* If "KEY" pushbutton is pressed */
;;;290        if(MyKey == KEY)
;;;291        {
;;;292          /* Mask All Interrupts */
;;;293          NVIC_SETPRIMASK();
;;;294    
;;;295          /* If the Codec is Playing => PAUSE */
;;;296          if (GetVar_AudioPlayStatus() == AudioPlayStatus_PLAYING)
;;;297          {
;;;298            /* Update the display information */
;;;299            LCD_Update(PAUSE);
;;;300    
;;;301            /* Command the Pause of the current stream */
;;;302            SetVar_AudioPlayStatus(AudioPlayStatus_PAUSED);
;;;303          }
;;;304    
;;;305          /* If the Codec is PAUSED => Resume PLAYING */
;;;306          else if (GetVar_AudioPlayStatus() == AudioPlayStatus_PAUSED)
;;;307          {
;;;308            /* Update the LCD display */ 
;;;309            LCD_Update(PLAY); 
;;;310    
;;;311    #if STM3210E
;;;312            /* Start playing from the last saved position */
;;;313            I2S_CODEC_Play(GetVar_AudioDataIndex());
;;;314    #else
;;;315            DAC_CODEC_Play(GetVar_AudioDataIndex());
;;;316    #endif
;;;317          }
;;;318          /* If the Codec is STOPPED => PLAY from the file start address */
;;;319          else if (GetVar_AudioPlayStatus() == AudioPlayStatus_STOPPED)
;;;320          {
;;;321            /* Update the display information */
;;;322            LCD_Update(PLAY);
;;;323    
;;;324    #if STM3210E
;;;325            /* Initialize all devices w/choosen parameters */
;;;326            err = I2S_CODEC_Init(GetVar_CurrentOutputDevice(), AUDIO_FILE_ADDRESS);
;;;327    #else
;;;328            err = DAC_CODEC_Init(AUDIO_FILE_ADDRESS);
;;;329    #endif
;;;330      
;;;331            /* Error message display if failure */
;;;332            if (err != 0)
;;;333            {
;;;334              LCD_DisplayError(err);
;;;335    
;;;336              /* Enable the FSMC that share a pin w/ I2C1 (LBAR) */
;;;337              RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
;;;338    
;;;339              /* Clear the LCD */
;;;340              LCD_Clear(White);
;;;341    
;;;342              /* Display the previous menu */
;;;343              DisplayMenu();
;;;344    
;;;345              /* Disable mask of all interrupts */
;;;346              NVIC_RESETPRIMASK();
;;;347    
;;;348              /* Enable the JoyStick interrupts */
;;;349              IntExtOnOffConfig(ENABLE); 
00011c  e8bd47f0          POP      {r4-r10,lr}
000120  2001              MOVS     r0,#1
000122  f7ffbffe          B.W      IntExtOnOffConfig
                  |L4.294|
000126  2c06              CMP      r4,#6                 ;290
000128  d186              BNE      |L4.56|
00012a  f7fffffe          BL       NVIC_SETPRIMASK
00012e  f7fffffe          BL       GetVar_AudioPlayStatus
000132  2801              CMP      r0,#1                 ;296
000134  d106              BNE      |L4.324|
000136  0500              LSLS     r0,r0,#20             ;299
000138  f7fffffe          BL       LCD_Update
00013c  2002              MOVS     r0,#2                 ;302
00013e  f7fffffe          BL       SetVar_AudioPlayStatus
000142  e7d1              B        |L4.232|
                  |L4.324|
000144  f7fffffe          BL       GetVar_AudioPlayStatus
000148  2802              CMP      r0,#2                 ;306
00014a  d105              BNE      |L4.344|
00014c  4650              MOV      r0,r10                ;309
00014e  f7fffffe          BL       LCD_Update
000152  f7fffffe          BL       GetVar_AudioDataIndex
000156  e00d              B        |L4.372|
                  |L4.344|
000158  f7fffffe          BL       GetVar_AudioPlayStatus
00015c  2800              CMP      r0,#0                 ;319
00015e  d1c3              BNE      |L4.232|
000160  4650              MOV      r0,r10                ;322
000162  f7fffffe          BL       LCD_Update
000166  2000              MOVS     r0,#0                 ;328
000168  f7fffffe          BL       DAC_CODEC_Init
00016c  0006              MOVS     r6,r0                 ;328
00016e  d19d              BNE      |L4.172|
;;;350              return; 
;;;351            }  
;;;352              
;;;353    #if STM3210E
;;;354            /* Enable Playing the audio file */
;;;355            I2S_CODEC_Play(GetVar_DataStartAddr());
;;;356    #else
;;;357            DAC_CODEC_Play(GetVar_DataStartAddr());
000170  f7fffffe          BL       GetVar_DataStartAddr
                  |L4.372|
000174  f7fffffe          BL       DAC_CODEC_Play
000178  e7b6              B        |L4.232|
;;;358    #endif
;;;359          }
;;;360          /* Disable mask of all interrupts */
;;;361          NVIC_RESETPRIMASK();
;;;362        }
;;;363      }
;;;364    }
;;;365    
                          ENDP

00017a  0000              DCW      0x0000
                  |L4.380|
00017c  11110100          DCD      0x11110100
                  |L4.384|
000180  0005ffff          DCD      0x0005ffff

                          AREA ||.data||, DATA, ALIGN=0

                  previoustmp
000000  32                DCB      0x32
                  DemoTitle
000001  53544d33          DCB      0x53,0x54,0x4d,0x33
000005  32204932          DCB      0x32,0x20,0x49,0x32
000009  5320436f          DCB      0x53,0x20,0x43,0x6f
00000d  64656320          DCB      0x64,0x65,0x63,0x20
000011  44656d6f          DCB      0x44,0x65,0x6d,0x6f
                  CmdTitle0
000015  2020436f          DCB      0x20,0x20,0x43,0x6f
000019  6e74726f          DCB      0x6e,0x74,0x72,0x6f
00001d  6c204275          DCB      0x6c,0x20,0x42,0x75
000021  74746f6e          DCB      0x74,0x74,0x6f,0x6e
000025  733a2020          DCB      0x73,0x3a,0x20,0x20
                  CmdTitle1Playing
000029  4b45593e          DCB      0x4b,0x45,0x59,0x3e
00002d  50617573          DCB      0x50,0x61,0x75,0x73
000031  65202055          DCB      0x65,0x20,0x20,0x55
000035  5020203e          DCB      0x50,0x20,0x20,0x3e
000039  566f6c2b          DCB      0x56,0x6f,0x6c,0x2b
                  CmdTitle2Playing
00003d  53454c3e          DCB      0x53,0x45,0x4c,0x3e
000041  53746f70          DCB      0x53,0x74,0x6f,0x70
000045  20202044          DCB      0x20,0x20,0x20,0x44
000049  4f574e3e          DCB      0x4f,0x57,0x4e,0x3e
00004d  566f6c2d          DCB      0x56,0x6f,0x6c,0x2d
                  CmdTitle1Paused
000051  4b45593e          DCB      0x4b,0x45,0x59,0x3e
000055  506c6179          DCB      0x50,0x6c,0x61,0x79
000059  20202055          DCB      0x20,0x20,0x20,0x55
00005d  5020203e          DCB      0x50,0x20,0x20,0x3e
000061  53706b72          DCB      0x53,0x70,0x6b,0x72
                  CmdTitle2Paused
000065  53454c3e          DCB      0x53,0x45,0x4c,0x3e
000069  53746f70          DCB      0x53,0x74,0x6f,0x70
00006d  20202044          DCB      0x20,0x20,0x20,0x44
000071  4f574e3e          DCB      0x4f,0x57,0x4e,0x3e
000075  48656164          DCB      0x48,0x65,0x61,0x64
                  CmdTitle1Stopped
000079  20202020          DCB      0x20,0x20,0x20,0x20
00007d  5550203e          DCB      0x55,0x50,0x20,0x3e
000081  20537065          DCB      0x20,0x53,0x70,0x65
000085  616b6572          DCB      0x61,0x6b,0x65,0x72
000089  20202020          DCB      0x20,0x20,0x20,0x20
                  CmdTitle2Stopped
00008d  2020444f          DCB      0x20,0x20,0x44,0x4f
000091  574e203e          DCB      0x57,0x4e,0x20,0x3e
000095  20486561          DCB      0x20,0x48,0x65,0x61
000099  6470686f          DCB      0x64,0x70,0x68,0x6f
00009d  6e652020          DCB      0x6e,0x65,0x20,0x20
                  StatusTitleStopped
0000a1  20202020          DCB      0x20,0x20,0x20,0x20
0000a5  20205374          DCB      0x20,0x20,0x53,0x74
0000a9  6f707065          DCB      0x6f,0x70,0x70,0x65
0000ad  64202020          DCB      0x64,0x20,0x20,0x20
0000b1  20202020          DCB      0x20,0x20,0x20,0x20
                  StatusTitlePlaying
0000b5  20202020          DCB      0x20,0x20,0x20,0x20
0000b9  2020506c          DCB      0x20,0x20,0x50,0x6c
0000bd  6179696e          DCB      0x61,0x79,0x69,0x6e
0000c1  67202020          DCB      0x67,0x20,0x20,0x20
0000c5  20202020          DCB      0x20,0x20,0x20,0x20
                  StatusTitlePaused
0000c9  20202020          DCB      0x20,0x20,0x20,0x20
0000cd  20202050          DCB      0x20,0x20,0x20,0x50
0000d1  61757365          DCB      0x61,0x75,0x73,0x65
0000d5  64202020          DCB      0x64,0x20,0x20,0x20
0000d9  20202020          DCB      0x20,0x20,0x20,0x20
                  i2cerr
0000dd  4552524f          DCB      0x45,0x52,0x52,0x4f
0000e1  523a4932          DCB      0x52,0x3a,0x49,0x32
0000e5  4320636f          DCB      0x43,0x20,0x63,0x6f
0000e9  6d2e202d          DCB      0x6d,0x2e,0x20,0x2d
0000ed  3e525354          DCB      0x3e,0x52,0x53,0x54
                  memerr
0000f1  4552524f          DCB      0x45,0x52,0x52,0x4f
0000f5  523a204d          DCB      0x52,0x3a,0x20,0x4d
0000f9  656d6f72          DCB      0x65,0x6d,0x6f,0x72
0000fd  7920202d          DCB      0x79,0x20,0x20,0x2d
000101  3e525354          DCB      0x3e,0x52,0x53,0x54
                  fileerr
000105  4552524f          DCB      0x45,0x52,0x52,0x4f
000109  523a204e          DCB      0x52,0x3a,0x20,0x4e
00010d  6f205761          DCB      0x6f,0x20,0x57,0x61
000111  76652046          DCB      0x76,0x65,0x20,0x46
000115  696c6520          DCB      0x69,0x6c,0x65,0x20

⌨️ 快捷键说明

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