📄 wmplatformdebug.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: WMPlatformDebug.h 2326 2005-10-20 08:40:38Z ib $
*
* Debug output for the various controllers.
*
* Warning:
* This driver is specifically written for Wolfson Codecs. It is not a
* general CODEC device driver.
*
*---------------------------------------------------------------------------*/
#ifndef __WMPLATFORMDEBUG_H__
#define __WMPLATFORMDEBUG_H__
/*
* Include files
*/
#include "WMStatus.h"
#include "WMDeviceContext.h"
#if DEBUG
/*
* Definitions
*/
/*
* Macros for register dump formatting.
*/
#define TRACE_REG_FORMAT "%7s = 0x%08X %s"
#define TRACE_REG( _regs, _reg, _comment ) WM_TRACE( hDevice, \
( TRACE_REG_FORMAT, \
#_reg, \
pDeviceContext->_regs->_reg, \
_comment ) )
#define TRACE_REG_TITLE( _regTitle ) WM_TRACE( hDevice, \
( "%s reg dump", \
_regTitle ) )
#define TRACE_REG_HEADER_FOOTER WM_TRACE( hDevice, \
( "--------------------" ) )
/*
* Function prototypes
*/
#ifdef __cplusplus
extern "C" {
#endif
/*-----------------------------------------------------------------------------
* Function: WMPlatformDumpAC97Regs
*
* Dump all the AC97 Registers to the debug console.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: void.
*
----------------------------------------------------------------------------*/
void WMPlatformDumpAC97Regs( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMPlatformDumpI2SRegs
*
* Dump all the I2S Registers to the debug console.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: none
*---------------------------------------------------------------------------*/
void WMPlatformDumpI2SRegs( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMPlatformDumpSSP2Regs
*
* Dump all the SSP2 Registers to the debug console.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: none
*---------------------------------------------------------------------------*/
void WMPlatformDumpSSP2Regs( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMPlatformDumpClockRegs
*
* Dump all the clock Registers to the debug console.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: none
*---------------------------------------------------------------------------*/
void WMPlatformDumpClockRegs( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMPlatformDumpGPIORegs
*
* Dump all the GPIO Registers to the debug console.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: none
*---------------------------------------------------------------------------*/
void WMPlatformDumpGPIORegs( WM_DEVICE_HANDLE hDevice );
#ifdef __cplusplus
} /* extern "C" */
#endif
#else /* DEBUG */
#define WMPlatformDumpAC97Regs( _hDevice ) (0)
#define WMPlatformDumpI2SRegs( _hDevice ) (0)
#define WMPlatformDumpSSPRegs( _hDevice ) (0)
#define WMPlatformDumpClockRegs( _hDevice ) (0)
#define WMPlatformDumpGPIORegs( _hDevice ) (0)
#endif /* DEBUG */
#endif /* __WMPLATFORMDEBUG_H__ */
/*------------------------------ END OF FILE ---------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -