📄 i2s.h
字号:
/******************************************************************************
**
** COPYRIGHT (C) 2001, 2002 Intel Corporation.
**
** This software as well as the software described in it is furnished under
** license and may only be used or copied in accordance with the terms of the
** license. The information in this file is furnished for informational use
** only, is subject to change without notice, and should not be construed as
** a commitment by Intel Corporation. Intel Corporation assumes no
** responsibility or liability for any errors or inaccuracies that may appear
** in this document or any software that may be provided in association with
** this document.
** Except as permitted by such license, no part of this document may be
** reproduced, stored in a retrieval system, or transmitted in any form or by
** any means without the express written consent of Intel Corporation.
**
** FILENAME: xllp_i2s.h
**
** PURPOSE: contains all I2S specific macros, typedefs, and prototypes.
** Declares no storage.
**
**
******************************************************************************/
#include "systypes.h"
#include "timedelays.h"
#include "xllp_defs.h"
#include "i2c.h"
#include "xllp_bcr.h"
#include "xllp_gpio.h"
#include "xllp_clkmgr.h"
#ifndef __I2S_H__
#define __I2S_H__
#define I2S_BASE 0x40400000 // I2S Base Register Location
#define GPIO_ADDR 0x40E00000
#define CLKMGR_ADDR 0x41300000
#define BCR_ADDR 0x08000000
XLLP_UINT32_T I2S_CodecSetup(void);
XLLP_UINT32_T I2S_DACSetup(void);
XLLP_UINT32_T I2S_ADCSetup(void);
XLLP_UINT32_T I2S_Test(void);
#define ERR_S_GPIO28 0x001
#define ERR_S_GPIO29 0x002
#define ERR_S_GPIO30 0x003
#define ERR_S_GPIO31 0x004
#define ERR_S_GPIO32 0x005
#define ERR_TS_I2S_INIT 0x010
#define ERR_S_SET_ALTFUNC1 0x020
#define ERR_S_SET_ALTFUNC2 0x040
#define ERR_S_SET_DIR 0x080
#define ERR_S_I2SCLOCK 0x90
#define ERR_S_I2SAMP 0xA0
#define ERR_S_I2SSETUPBAD 0xB0
#define ERR_S_TRANSFIFONEVEREMPTY 0xC0
#define ERR_TS_AUDIO 0x80
#define ERR_TS_SETUP 0x81 // codec was not set up
#define ERR_TS_ADC 0x82 // couldn't set up the ADC correctly
#define ERR_TS_DAC 0x83 // couldn't set up the DAC correctly
#define ERR_TS_I2C_INIT 0x84
#define ERR_TS_I2C_CODWRITE 0x85
#define ERR_TS_I2C_DACWRITE 0x86
#define ERR_TS_I2C_ADCWRITE 0x87
#define ERR_TS_HWSETUP 0x88 // couldn't set up the ADC correctly
#define ERR_TS_CODECSETUP 0x89 // couldn't set up the DAC correctly
#define PWRDWN 0x1
#define RESET 0x2
#define SAMPCONTROL 0x3
#define LEFTLINEIN 0x4
#define RIGHTLINEIN 0x5
#define AAPATHCONTROL 0x6
#define DAPATHCONTROL 0x7
#define DAINTERFACEFORMAT 0x8
#define POWERDOWNCONTROL 0x9
#define ACTIVECONTROLON 0xA
#define ACTIVECONTROLOFF 0xB
#define I2SBUF 48000
#endif //__I2S_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -