📄 wmplatformdevicecontext.h
字号:
/*-----------------------------------------------------------------------------
* Copyright (c) Wolfson Microelectronics plc. All rights reserved.
*
* This software as well as any related documentation 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 Wolfson Microelectronics plc. Wolfson Microelectronics plc
* 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 Wolfson Microelectronics plc.
*
* $Id: WMPlatformDeviceContext.h 1562 2005-04-14 11:07:12Z ib $
*
* The library is divided into two sets of functions. One set, "Raw", have
* no global data and make no system calls. The other set build upon the
* Raw functions to provide further functionality and ease of use.
*
* This file defines the information which has to be provided to the Raw
* functions as working storage.
*
* Warning:
* This driver is specifically written for Wolfson Codecs. It is not a
* general CODEC device driver.
*
*---------------------------------------------------------------------------*/
#ifndef __WMPLATFORMDEVICECONTEXT_H__
#define __WMPLATFORMDEVICECONTEXT_H__
/*
* Include files
*/
#include "WMConfig.h"
#include "WMPlatform.h"
#include "WMPlatform_Raw.h"
#include "WMDeviceContext.h"
/*
* Definitions
*/
typedef struct tagDMAContext DMAContext;
typedef struct tagWM_XSCALE_DEVICE_CONTEXT
{
WM_DEVICE_CONTEXT_HEADER
/*
* WM_DEVICE_CONTEXT_HEADER is as follows:
* volatile WM_SHARED_DATA *v_pWMData;
* volatile WM_ADC_DATA *v_pADCData;
*
* SleepFn fnSleep;
* LockFn fnLockLink;
* UnlockFn fnUnlockLink;
* IncrementFn fnAtomicIncrement;
* DecrementFn fnAtomicDecrement;
* InitFn fnLinkInit;
* ShutdownFn fnLinkShutdown;
* InitFn fnTouchInit;
* CodecReadFn fnCodecRead;
* CodecWriteFn fnCodecWrite;
* InitDeviceIdFn fnInitDeviceId;
* CodecResetFn fnCodecReset;
* CodecResetFn fnCodecWake;
*
* unsigned int flags;
* unsigned char preventSyscallCount;
* unsigned char activeDrivers;
* WM_POWERFLAG preSleepPower;
*
* WM_DEVICE_ID deviceID;
* WM_CHIPTYPE deviceType;
* WM_CHIPREV revision;
* WM_2WIRE_ADDR codecAddress;
* WM_STREAM_ID defaultOutputStream;
* WM_STREAM_ID defaultInputStream;
* const WM_CHIPDEF *pChipDef;
*/
VOLATILE_AC97_T *v_pAC97Regs;
VOLATILE_I2C_T *v_pI2CRegs;
VOLATILE_I2S_T *v_pI2SRegs;
VOLATILE_GPIO_T *v_pGPIORegs;
VOLATILE_OST_T *v_pOSTimerRegs;
VOLATILE_INTC_T *v_pIntRegs;
VOLATILE_CLKMGR_T *v_pClkRegs;
VOLATILE_BCR_T *v_pBLRegs;
#if WM_VOICE
VOLATILE_SSP_T *v_pSSP2Regs;
#endif /* WM_VOICE */
#if WM_AUDIO_STREAM
VOLATILE_DMAC_T *v_pDmaReg;
DMAContext *pDMAContext;
#endif /* WM_AUDIO_STREAM */
} WM_XSCALE_DEVICE_CONTEXT;
/*
* Global data.
*/
/*
* Function prototypes
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __WMPLATFORMDEVICECONTEXT_H__ */
/*------------------------------ END OF FILE ---------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -