MP3编解码原程序以及设计资料

源代码在线查看: mp3_drv.h

软件大小: 2540 K
上传用户: ryan_li17
关键词: MP3 编解码 程序 设计资料
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* NAME:         mp3_drv.h         
				*----------------------------------------------------------------------------
				* Copyright (c) 2003 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      snd1c-refd-nf-4_0_3      
				* REVISION:     1.7     
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the MP3 decoder definition
				*****************************************************************************/
				
				#ifndef _MP3_DRV_H_
				#define _MP3_DRV_H_
				
				/*_____ I N C L U D E S ____________________________________________________*/
				
				
				/*_____ M A C R O S ________________________________________________________*/
				
				
				/*_____ D E F I N I T I O N ________________________________________________*/
				
				
				/*_____ D E C L A R A T I O N ______________________________________________*/
				
				void    mp3_init      (void);
				void    mp3_set_prio  (Byte);
				void    mp3_stop      (void);
				void    mp3_restart   (void);
				
				#define Mp3_enable()          (MP3CON |= MSK_MPEN)
				#define Mp3_disable()         (MP3CON &= ~MSK_MPEN)
				#define Mp3_enable_int()      (EMP3 = 1)
				#define Mp3_disable_int()     (EMP3 = 0)
				#define Mp3_mask_int_set(i)   (MP3CON |= (i))
				#define Mp3_mask_int_clr(i)   (MP3CON &= ~(i))
				#define Mp3_ack_int()         (ACC = MP3STA)
				#define Mp3_skip_crc_error()  (MP3CON |= MSK_CRCEN)
				#define Mp3_play_crc_error()  (MP3CON &= ~MSK_CRCEN)
				#define Mp3_set_bass_boost()  (MP3CON |= MSK_MPBBST)
				#define Mp3_clr_bass_boost()  (MP3CON &= ~MSK_MPBBST)
				#define Mp3_load(d)           (MP3DAT = d)
				#define Mp3_set_clock(c)      (MP3CLK = c)
				#define Mp3_frame_int()       (MPREQ)
				#define Mp3_frame_request()   ((MP3STA1 & MSK_MPFREQ) == MSK_MPFREQ)
				#define Mp3_byte_request()    ((MP3STA1 & MSK_MPBREQ) == MSK_MPBREQ)
				#define Mp3_set_right_vol(v)  (MP3VOR = v)
				#define Mp3_set_left_vol(v)   (MP3VOL = v)
				#define Mp3_set_bass(v)       (MP3BAS = v)
				#define Mp3_set_medium(v)     (MP3MED = v)
				#define Mp3_set_treble(v)     (MP3TRE = v)
				#define Mp3_get_right_vol()   ((Byte)MP3VOR)
				#define Mp3_get_left_vol()    ((Byte)MP3VOL)
				#define Mp3_get_bass()        ((Byte)MP3BAS)
				#define Mp3_get_medium()      ((Byte)MP3MED)
				#define Mp3_get_treble()      ((Byte)MP3TRE)
				#define Mp3_get_mpeg()        (MP3STA & MSK_MPVER)
				#define Mp3_get_fs()          (MP3STA & MSK_FS)
				#define Mp3_play_error()      ((MP3STA & (MSK_ERRLAY | MSK_ERRSYN)) != 0)
				#define Mp3_set_full()        (MP3DBG |= MSK_MPFULL)
				#define Mp3_reset_full()      (MP3DBG &= ~MSK_MPFULL)
				
				
				
				#endif  /* _MP3_DRV_H_ */
				
							

相关资源