⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wmdiagnostics.h

📁 pxa270平台 windows mobile 5.2 wm9713 触摸屏+音频驱动
💻 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: WMDiagnostics.h 1509 2005-04-01 13:07:24Z ib $
 *
 * Diagnostic functionality.
 *
 *
 * Warning:
 *  This driver is specifically written for Wolfson Codecs. It is not a 
 *  general CODEC device driver.
 *
 * ---------------------------------------------------------------------------*/

#ifndef __WMDIAGNOSTICS_H__
#define __WMDIAGNOSTICS_H__

/*
 * Include files
 */
#include "WMPlatform.h"		/* Definitions for WMTRACE and WM_ASSERT */

/*
 * Global definitions
 */

/*
 * Hex LED definitions.
 * Each section can be turned on or off by the
 * use of a define.
 */

/*
 * DMA interrupts.
 * To enable DMA channel debug to the hex leds
 * define DEBUG_DMA_INTERRUPT as TRUE.
 */
#define DEBUG_DMA_INTERRUPT                     FALSE
#define WM_HEX_LED_DMA_INTERRUPT            0xDA000000


/*
 * Pen interrupts.
 * To enable pen interrupt debug to the hex leds
 * define DEBUG_TOUCH_INTERRUPT as TRUE.
 */
#define DEBUG_TOUCH_INTERRUPT                   FALSE

#define WM_HEX_LED_PEN_ENABLE_INTERRUPT     0xAC970001
#define WM_HEX_LED_PEN_DISABLE_INTERRUPT    0xAC970002
#define WM_HEX_LED_PEN_INTERRUPT_DONE       0xAC970003
#define WM_HEX_LED_PEN_DOWN_INTERRUPT       0xAC970004
#define WM_HEX_LED_PEN_TIMER_INTERRUPT      0xAC970005
#define WM_HEX_LED_AC97_UNKNOWN_INTERRUPT   0xAC970006

/*
 * Audio interrupts.
 * To enable audio interrupt debug to the hex leds
 * define DEBUG_AUDIO_INTERRUPT as TRUE.
 */
#define DEBUG_AUDIO_INTERRUPT                   FALSE

#define WM_HEX_LED_DMAC_AUDIO_XMIT_INTERRUPT    0xAC970010
#define WM_HEX_LED_DMAC_AUDIO_RCV_INTERRUPT     0xAC970011
#define WM_HEX_LED_DMAC_OTHER_INTERRUPT         0xAC970012
#define WM_HEX_LED_DMAC_UNKNOWN_INTERRUPT       0xAC970013

/*
 * Function prototypes
 */
#ifdef __cplusplus
extern "C" {
#endif

#if WM_USE_DEBUG_JACKET || defined( DEBUG )
/*-----------------------------------------------------------------------------
 * Function: WMDebugJacket
 *
 * Purpose: This function allows you to do register reads and writes through
 * the debugger.  To use it, set a breakpoint at the start of the routine.
 * 
 * Parameters:
 *      hDevice     handle to the device (from WMOpenDevice).
 *
 * Returns:      void.
 *
 ----------------------------------------------------------------------------*/
void WMDebugJacket( WM_DEVICE_HANDLE hDevice );
#endif /* WM_USE_DEBUG_JACKET || defined( DEBUG ) */

#ifdef DEBUG
/*-----------------------------------------------------------------------------
 * Function: WMDumpEveryReg
 * 
 * Purpose: Output the value of every register on the codec 
 *          (for debugging purposes only).
 *  
 * Parameters:
 *      hDevice     handle to the device (from WMOpenDevice).
 *
 * Returns:      void.
 *
 ----------------------------------------------------------------------------*/
void WMDumpEveryReg( WM_DEVICE_HANDLE hDevice );
#else /* DEBUG */
#define WMDumpEveryReg( _hDevice ) (0)
#endif /* DEBUG */

#ifdef DEBUG
/*-----------------------------------------------------------------------------
 * Function: WMDumpReg
 * 
 * Purpose: Output the value of 1 register on the codec 
 *          (for debugging purposes only).
 *		reg			register to read.
 *  
 * Parameters:
 *      hDevice     handle to the device (from WMOpenDevice)
 *
 * Returns:      void.
 *
 ----------------------------------------------------------------------------*/
void WMDumpReg( WM_DEVICE_HANDLE hDevice, WM_REGTYPE reg);
#else /* DEBUG */
#define WMDumpReg( _hDevice, reg ) (0)
#endif /* DEBUG */

/*-----------------------------------------------------------------------------
 * Function: WMOutputToHexLeds
 * 
 * Purpose: Output a value to the hex leds 
 *  
 * Parameters:
 *      hDevice     handle to the device (from WMOpenDevice).
 *      value       value to output to the hex leds.
 *
 * Returns:      void.
 *
 ----------------------------------------------------------------------------*/
void WMOutputToHexLeds( WM_DEVICE_HANDLE hDevice, unsigned long value );

#ifdef __cplusplus
}   /* extern "C" */
#endif

#endif /* __WMDIAGNOSTICS_H__ */
/*------------------------------ END OF FILE ---------------------------------*/

⌨️ 快捷键说明

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