制作硬盘MP3的源代码与PCB图

源代码在线查看: aud_drv.h

软件大小: 870 K
上传用户: ybsscauc
关键词: MP3 PCB 硬盘 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* NAME:         aud_drv.h         
				*----------------------------------------------------------------------------
				* Copyright (c) 2003 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      snd1c-refd-nf-4_0_3      
				* REVISION:     1.3     
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the audio driver definitions
				*****************************************************************************/
				
				#ifndef _AUD_DRV_H_
				#define _AUD_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    aud_set_prio (Byte);
				void    aud_stop (void);
				void    aud_emph (Byte);
				
				#define Aud_enable()          (AUDCON1 |= MSK_AUDEN)
				#define Aud_disable()         (AUDCON1 &= ~MSK_AUDEN)
				#define Aud_enable_int()      (EAUD = 1)
				#define Aud_disable_int()     (EAUD = 0)
				#define Aud_set_data_16()     (AUDCON0 &= ~MSK_DSIZ)
				#define Aud_set_data_32()     (AUDCON0 |= MSK_DSIZ)
				#define Aud_set_i2s_16()      (AUDCON0 = 0x10)
				#define Aud_set_i2s_32()      (AUDCON0 = 0x12)
				#define Aud_set_pcm_16(n)     (AUDCON0 = (0x104-(n				#define Aud_set_pcm_32(n)     (AUDCON0 = (0x106-(n				#define Aud_set_song()        (AUDCON1 = (MSK_MSREQ | MSK_MUDRN))
				#define Aud_set_voice(n)      (AUDCON1 = (MSK_MUDRN | MSK_SRC | n))
				#define Aud_set_oversamp(o)   (AUDCON0 &= ~MSK_HLR);  (AUDCON0 |= o)
				
				#define Aud_song_pause()      (AUDCON1 &= ~MSK_DRQEN)
				#define Aud_song_play()       (AUDCON1 |= MSK_DRQEN)
				
				#define Aud_voice_pause()     (EAUD = 0)
				#define Aud_voice_play()      (EAUD = 1)
				#define Aud_set_clock(c)      (AUDCLK = c)
				
				
				#endif  /* _AUD_DRV_H_ */
				
							

相关资源