📄 wmgpiodefs.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: WMGPIODefs.h 2011 2005-08-09 13:49:53Z ian $
*
* This file contains GPIO definitions for Wolfson codecs.
*
*
* Warning:
* This driver is specifically written for Wolfson Codecs. It is not a
* general CODEC device driver.
*
*---------------------------------------------------------------------------*/
#ifndef __WMGPIODEFS_H__
#define __WMGPIODEFS_H__
/*
* Include files
*/
#include "WMTypes.h"
/*
* Definitions
*/
#define WM_GPIO_PIN WM_REGVAL
#define WM_GPIO_NONE 0x0
/* GPIO defines */
#define WM_GPIO_1 WM_BIT_1
#define WM_GPIO_2 WM_BIT_2
#define WM_GPIO_3 WM_BIT_3
#define WM_GPIO_4 WM_BIT_4
#define WM_GPIO_5 WM_BIT_5
#define WM_GPIO_6 WM_BIT_6
#define WM_GPIO_7 WM_BIT_7
#define WM_GPIO_8 WM_BIT_8
#define WM_GPIO_9 WM_BIT_9
#define WM_GPIO_10 WM_BIT_10
#define WM_GPIO_11 WM_BIT_11
#define WM_GPIO_12 WM_BIT_12
#define WM_GPIO_13 WM_BIT_13
#define WM_GPIO_14 WM_BIT_14
#define WM_GPIO_15 WM_BIT_15
/* Alternate function defines */
#define WM_GPIO_IRQ WM_GPIO_2
#define WM_GPIO_PENDOWN WM_GPIO_3
#define WM_GPIO_ADA WM_GPIO_4
#define WM_GPIO_MASK WM_GPIO_4
#define WM_GPIO_SPDIF_OUT WM_GPIO_5
#define WM_GPIO_SECONDARY_ADA WM_GPIO_6
#define WM_GPIO_SECONDARY_MASK WM_GPIO_6
#define WM_GPIO_SECONDARY_PENDOWN WM_GPIO_7
#define WM_GPIO_SECONDARY_SPDIF_OUT WM_GPIO_8
/* Virtual GPIO defines */
#define WM_GPIO_VIRTUAL_MICDET WM_GPIO_9
#define WM_GPIO_VIRTUAL_MICSHT WM_GPIO_10
#define WM_GPIO_VIRTUAL_THERMAL_CUTOUT WM_GPIO_11
#define WM_GPIO_VIRTUAL_ADA WM_GPIO_12
#define WM_GPIO_VIRTUAL_PENDOWN WM_GPIO_13
#define WM_GPIO_VIRTUAL_COMP2 WM_GPIO_14
#define WM_GPIO_VIRTUAL_COMP1 WM_GPIO_15
#define WM_GPIO_OUTPUT 0x1
#define WM_GPIO_INPUT 0x2
#define WM_GPIO_ACTIVE_HIGH 0x1
#define WM_GPIO_ACTIVE_LOW 0x2
#define WM_GPIO_OUTPUT_HIGH 0x1
#define WM_GPIO_OUTPUT_LOW 0x2
/*
* Additional function defines.
* Reg 58h on WM9712
* Reg 5Ah on WM9713
*/
#define WM_GPIO_IRQ_INV WM_BIT_0
#define WM_GPIO_WAKEEN WM_BIT_1
#define WM_GPIO_RESETB_DISABLE WM_BIT_8 /* WM9713 only */
/*
* Voice codec control defines Register 36h.
* WM9713 only.
*/
#define WM_GPIO_VOICE_INTERFACE_ENABLE WM_BIT_15
#endif /* __WMGPIODEFS_H__ */
/*------------------------------ END OF FILE ---------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -