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

源代码在线查看: voice_drv.h

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

相关代码

				/*H**************************************************************************
				* NAME:         voice_drv.h
				*----------------------------------------------------------------------------
				* Copyright (c) 2003 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      snd1c-refd-nf-4_0_3      
				* REVISION:     1.6     
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the voice driver definitions
				*****************************************************************************/
				
				#ifndef _VOICE_DRV_H_
				#define _VOICE_DRV_H_
				
				/*_____ I N C L U D E S ____________________________________________________*/
				
				#include "lib_mcu\timer\timer_drv.h"  /* timer driver definition */
				#include "lib_mcu\adc\adc_drv.h"      /* adc driver definition */
				#include "lib_mcu\aud\aud_drv.h"      /* audio driver definition */
				
				
				/*_____ M A C R O S ________________________________________________________*/
				
				#define T1_BASE         (256 - SAMPLING_PERIOD * (FT1_IN / 6))
				#define NB_SAMPLES      SCHEDULER_TICK / SAMPLING_PERIOD
				
				#define VOC_VOLUME_MIN  5
				#define VOC_VOLUME_INIT 2
				#define VOC_VOLUME_MAX  1
				
				/*_____ D E F I N I T I O N ________________________________________________*/
				
				extern  Byte  voc_volume;               /* volume value */
				
				/*_____ D E C L A R A T I O N ______________________________________________*/
				
				void    voc_rec_init (void);
				void    voc_play_init (void);
				void    voc_play_start (void);
				void    voc_play_stop (void);
				void    voc_inc_volume (void);
				void    voc_dec_volume (void);
				
				#define Voc_rec_start()         (T1_start())
				#define Voc_rec_pause()         (T1_stop())
				#define Voc_rec_stop()          (T1_stop()); (Adc_disable())
				
				#define Voc_play_pause()        (Aud_voice_pause())
				
				#define Voc_get_volume()        (VOC_VOLUME_MIN - voc_volume)
				#define Voc_init_volume()       (voc_volume = VOC_VOLUME_INIT)
				
				
				#endif  /* _VOICE_DRV_H_ */
				
							

相关资源