MP3播放器详细设计方案

源代码在线查看: voice_drv.h

软件大小: 17283 K
上传用户: csytml
关键词: MP3 播放器 详细设计 方案
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* $RCSfile: voice_drv.h,v $
				*----------------------------------------------------------------------------
				* Copyright (c) 2002 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      $Name: DEMO_FAT_1_9_9 $      
				* REVISION:     $Revision: 1.4 $     
				* FILE_CVSID:   $Id: voice_drv.h,v 1.4 2002/09/06 12:59:12 njourdan Exp $       
				*----------------------------------------------------------------------------
				* 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\timer\timer_drv.h"  /* timer driver definition */
				#include "..\..\..\..\lib\adc\adc_drv.h"      /* adc driver definition */
				#include "..\..\..\..\lib\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_ */
				
							

相关资源