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

📄 sys_config.h

📁 MP3源码 内有SD2.0 驱动 FAT32 驱动
💻 H
字号:
/*****************************************************/
/*                sys_config.h file                                                   */
/* Description : contain include file, key, macros etc...               */
/* Platform     : AVRStudio4.13 + WinAVR20070525  m64        */
/* Author       : Michael Zhang - 章其波                            */
/* Email         : sudazqb@163.com                                          */
/* MSN          : zhangqibo_1985@hotmail.com                          */
/* Date          : 2008-03-08                                                    */
/* NOT FOR COMMERCIAL USE,     ALL RIGHT RESERVED!         */
/*****************************************************/
/* 20080308: original version                    */
/*****************************************************/


#ifndef __SYS_CONFIG__
#define __SYS_CONFIG__

#include<avr/io.h>
#include<avr/eeprom.h>
#include"CH375/CH375.h"
#include"FAT/FAT.h"
#include"UART/UART.H"
#include"VS1003B/VS1003B.h"
#include<avr/pgmspace.h>
#include"LCD/LCD_ASCII.h"
#include"LCD/LCD.H" 
#include"LCD/LCD_GBK.h"
#include"MMC_SD/MMC_SD.h"
#include"LCD/LCD_APP.h"
#include<avr/interrupt.h>


#define STOP_KEY 1

#define CHAR		char
#define BYTE		unsigned char
#define WORD	unsigned int
#define DWORD	unsigned long

#define uint8		unsigned char
#define  int8		signed char
#define uint16	unsigned int
#define  int16	signed int
#define uint32	unsigned long
#define  int32	signed long

#define uint unsigned int

#define ENTER_KEY 0x0d
#define BACK_KEY  0x08
#define ESC_KEY   0x1b
#define MAX       64

#if STOP_KEY
	#define MODE _BV(PE7)
	#define STOP _BV(PE6)
#else
	#define MODE _BV(PE6)
	#define STOP _BV(PE7)
#endif

#define NEXT _BV(PE3)
#define UP   _BV(PE5)
#define DOWN _BV(PE4)
#define PREV _BV(PE2)

#define LCD_BL PG3
#define LCD_BL_CON DDRG |= 1<<LCD_BL
#define LCD_BL_ON  PORTG &= ~(1<<LCD_BL)
#define LCD_BL_OFF  PORTG |= 1<<LCD_BL
#define LCD_BL_INV PORTG ^= 1<<LCD_BL

#define MP3 1
#define WMA 2
#define MID 3
#define WAV 4

//mode
#define REPET_ALL 0
#define REPET_ONE 1
#define RANDOM    2

#define KEY_LONG_TIME 255
#define KEY_VALID_TIME 10

#define KEY_PRESEED		1<<7
#define KEY_RELEASED	1<<6
#define KEY_LONG		1<<5
#define KEY_VALID		1<<4
#define KEY_VALUE_MASK	0x0f

#define KEY_STOP	0
#define KEY_MODE	1
#define KEY_NEXT	2
#define KEY_PREV	3
#define KEY_UP		4
#define KEY_DOWN	5


#define FIX_DIRECTORY 0		/* 1 means use fix directory, 0 for any directory */


/* The path of the music file & lyric file , caution: each driectory should long longer than 8, that is not support long name*/
#if FIX_DIRECTORY
#define MUSIC_PATH "\\music"
#endif

#define LRC_PATH "\\lrc"


#endif

⌨️ 快捷键说明

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