基于AT89C51SND1的MP3的程序设计(包括播放mp3和录音功能)

源代码在线查看: disp.h

软件大小: 1052 K
上传用户: shkk21
关键词: SND1 89C C51 SND
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* NAME:         disp.h         
				*----------------------------------------------------------------------------
				* Copyright (c) 2003 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      snd1c-refd-nf-4_0_3      
				* REVISION:     1.10     
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the high level display definition
				*****************************************************************************/
				
				#ifndef _DISP_H_
				#define _DISP_H_
				
				/*_____ I N C L U D E S ____________________________________________________*/
				#ifndef CONF_DISPLAY
				  #define LCD         0
				  #define LED         1
				  #define CONF_DISPLAY LCD
				#endif
				#if CONF_DISPLAY == LED
				#include "led_task.h"
				#else
				#include "lib_demob\lcd\lcd_drv.h"          /* lcd driver definition */ 
				#endif
				#include "modules\mem\hard.h"
				#include "board.h"
				
				
				/*_____ M A C R O S ________________________________________________________*/
				
				/*----- Screens -----*/
				#define SPLASH_SCREEN       "\6T8xC51SND1 DEMO\nFIRMWARE "
				#define FATAL_SCREEN        "Fatal Error     \nBad Chip Version "
				#if MEM_CHIP_TYPE == CHIP_DF
				#define FATAL_CHIP_SCREEN     "Fatal Error     \nBad DataFlash "
				#endif
				#if MEM_CHIP_TYPE == CHIP_NF
				#define FATAL_CHIP_SCREEN     "Fatal Error     \nBad NandFlash "
				#endif
				#if MEM_CHIP_TYPE == CHIP_HDD
				#define FATAL_CHIP_SCREEN     "Fatal Error     \nBad HDD "
				#endif
				#define SONG_SCREEN         "\6 \1 \4 \3   \5 0:00\n\2  --           "
				#define VOICE_SCREEN        "\6 \1 \4 \3     0:00\n\2  --           "
				#define TOOL_SCREEN         "\6 \1 \4           \n\2               \r"
				#define MASS_SCREEN         "\6 \1 \4           \n                \r"
				#define MASS_SCREEN_NO_MEM  "\6 \1  \n"
				
				
				/*----- LCD positons ----*/
				#define POS_HOME        LCD_LINE0, 0
				
				#define POS_LOCK        LCD_LINE0, 0
				
				#define POS_MEM         LCD_LINE0, 5
				
				#define POS_REPEAT      LCD_LINE0, 10
				
				#define POS_SOUND       LCD_LINE0, 6
				#define POS_SOUND_LVL   LCD_LINE0, 7
				
				#define POS_FILE        LCD_LINE1, 2
				
				#define POS_TIME        LCD_LINE0, 11
				#define POS_MINUTE      LCD_LINE0, 11
				#define POS_SECOND      LCD_LINE0, 14
				
				
				/*----- CGRAM -----*/
				#define CHAR_SPARE1     0x00                /* spare icon address */
				#define CHAR_MODE       0x01                /* mode icon address */
				#define CHAR_STATE      0x02                /* state icon address */
				#define CHAR_TYPE       0x02                /* file type icon address */
				#define CHAR_SOUND      0x03                /* sound icon address */
				#define CHAR_MEM        0x04                /* memory icon address */
				#define CHAR_REPEAT     0x05                /* repeat icon address */
				#define CHAR_LOCK       0x06                /* lock icon address */
				#define CHAR_SPARE2     0x07                /* spare icon address */
				
				#define CGRAM_SPARE1    CHAR_SPARE1*CGRAM_CHAR_SIZE
				#define CGRAM_MODE      CHAR_MODE*CGRAM_CHAR_SIZE
				#define CGRAM_STATE     CHAR_STATE*CGRAM_CHAR_SIZE
				#define CGRAM_TYPE      CHAR_TYPE*CGRAM_CHAR_SIZE
				#define CGRAM_SOUND     CHAR_SOUND*CGRAM_CHAR_SIZE
				#define CGRAM_MEM       CHAR_MEM*CGRAM_CHAR_SIZE
				#define CGRAM_REPEAT    CHAR_REPEAT*CGRAM_CHAR_SIZE
				#define CGRAM_LOCK      CHAR_LOCK*CGRAM_CHAR_SIZE
				#define CGRAM_SPARE2    CHAR_SPARE2*CGRAM_CHAR_SIZE
				
				
				/* memory type */
				#define SYMB_CHIP       0
				#define SYMB_CARD       1
				#define SYMB_CARD1      2
				#define SYMB_CARD2      3
				#define SYMB_NO_MEM     4
				
				/* repeat type */
				#define SYMB_NO_REPEAT  0
				#define SYMB_REP_DIR    1
				#define SYMB_REP_FILE   2
				#define SYMB_REP_A      3
				#define SYMB_REP_B      4
				
				
				/*_____ D E F I N I T I O N ________________________________________________*/
				
				/* Menu Structure */
				typedef struct
				{
				  Byte  state;
				  char  disp[18];
				} St_menu;
				
				
				/*_____ D E C L A R A T I O N ______________________________________________*/
				
				#define Print_char(c)                   Lcd_put_char(c)
				#define Print_home(l)                   Lcd_put_cmd(l)
				
				void    print_init (void);
				void    print_state_blank (void);
				void    print_state_stop (void);
				void    print_state_play (void);
				void    print_state_pause (void);
				void    print_state_record (void);
				void    print_state_error (void);
				void    print_mode_song (void);
				void    print_mode_voice (void);
				void    print_mode_mass (void);
				void    print_mode_tool (void);
				void    print_sound (void);
				void    print_sound_level (void);
				void    print_voice_vol (char);
				void    print_kbd_lock (void);
				void    print_kbd_unlock (void);
				void    print_mem (Byte);
				void    print_repeat (Byte);
				void    print_screen (char code *);
				void    print_string (char code *);
				void    print_decim (Byte, bit);
				void    print_time (Byte, Byte);
				void    print_min (Byte);
				void    print_sec (Byte);
				void    print_file_name (void);
				void    print_file_type (void);
				bit     print_name (char pdata *);
				
				
				#endif  /* _DISP_H_ */
				
							

相关资源