ac97.h

来自「基于一款32位嵌入式微处理器的音频接口的测试代码」· C头文件 代码 · 共 62 行

H
62
字号
/*************************************************************************************
*	Copyright (c) 2005 by National ASIC System Engineering Research Center.
*	PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this 
*	material.  All manufacturing, reproduction, use, and sales rights 
*	pertaining to this subject matter are governed by the license agreement.
*	The recipient of this software implicitly accepts the terms of the license.
*
*	File Name: ac97.h
*
*	File Description:
*			The file define some macro definition used in ac97.c file.
*		
*	Created by Michael <yuyu_zh@seu.edu.cn>, 2005-03-31
**************************************************************************************/

#ifndef AC97_H
#define AC97_H

#include "typedef.h"

#define REPEAT

/* definition of register address */
#define AC97_BASE	0X10008000
#define DMA_BASE 	0x11001000

#define AC97_CONR   		(AC97_BASE+0X00)			//AC97 control register
#define AC97_OCR			(AC97_BASE+0X04)			//Output Channel Configure Register
#define AC97_ICR			(AC97_BASE+0X08)			//Input Channel Configure Register
#define AC97_CRAC			(AC97_BASE+0X0c)    			//codec register access register
#define AC97_INT_ENABLE		(AC97_BASE+0X10)	
#define AC97_INT_STATUS		(AC97_BASE+0X14)
#define AC97_INT_CLEAR		(AC97_BASE+0X18)
#define AC97_ENABLE			(AC97_BASE+0X1c)
#define AC97_OUT_FIFOADDR	(AC97_BASE+0X20)
#define AC97_MONO_FIFOADDR	(AC97_BASE+0X30)

#define DMA_SA 				(DMA_BASE+0x000)
#define DMA_DA				(DMA_BASE+0x004)
#define DMA_CTRL			(DMA_BASE+0x00c)
#define DMA_ENABLE			(DMA_BASE+0X010)
//#define DMACIntTCClear		(DMA_BASE+0x60) 		//肖建处定义

/* command word */
#define READ		0x80000000
#define	WRITE		0x0

#define OVER_READ	 	( *(RP)AC97_CONR &  0x8 )
#define OVER_WRITE		( *(RP)AC97_CONR &  0x4  )

#define FIXED_SAMPLE		1
#define VRA_SAMPLE			0

/* definition of function */
STATUS	ModuleAc97(void);
void ConfigurationCodec(int type);
void ConfigurationAC97(int type);
void ConfigureDMA(void);
void InitAC97(void);
void dma_handler(void);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?