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

📄 record.c

📁 mega128+VS1003做的mp3的程序 可以用WINAVR编译
💻 C
字号:
#include <iom64v.h>
#include <macros.h>
#include <string.h>
#include <stdio.h>
#include "./record.h"
#include "../Keyboard/key.h"
#define uchar unsigned char
#define uint unsigned int
extern uchar keybuf;
extern uchar Filename[40];	  	   //保持选择的文件名称
void Play_record(void)
 {
   uchar ii;
   uchar data;
   ii = 0;
			while(1){
					 show_clear();
 					 show_lcd(0, 56, 80, 2, &show_record[0],0);  
 					 show_lcd(3, 56, 80, 2, &new_record[0],0);  
 					 show_lcd(6, 56, 80, 2, &del_record[0], 0); 
 					 switch(ii)
  						{
   						case 0: show_lcd(0, 56, 80, 2, &show_record[0],1);
   		   				break;
   						case 1: show_lcd(3, 56, 80, 2, &new_record[0],1);
   		   				break;
   						case 2: show_lcd(6, 56, 80, 2, &del_record[0],1);
   		   				}
					 KEYBUF_NULL;
					 while(keybuf == NULL);
					 if(keybuf == K_DOWN){(++ii == 3) ? (ii = 0) : 0;}
					 if(keybuf == K_UP){(--ii == 255) ? (ii = 2) : 0;}
					 if(keybuf == K_ESC) break;
					 if(keybuf != K_ENTER) continue;
					 switch(ii)
  						{
   						case 0: adjust_cheng(1);  //打开MP3通道
						        Play_xuanzhe("\\RECORD\\*",0);
								adjust_cheng(0);  //恢复原来通道
   		   					    break;
   						case 1: 
							 	RecordAdpcm1003();
   		   					 	break;
   						case 2: while(1)
							 	{Play_xuanzhe("\\RECORD\\*",1);
							     if(keybuf == K_ESC) break;								   
							 	 if(Filename[0] == 0x00) break;
								 del_file(&Filename[0]);
								} 
							    break;
   		   				} 	
					  KEYBUF_NULL; 	
					 }//while(1)
 }

⌨️ 快捷键说明

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