📄 wminterrupts.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: WMInterrupts.h 1772 2005-06-02 14:51:13Z ib $
*
* Abstraction of interrupts.
*
*
* Warning:
* This driver is specifically written for Wolfson Codecs. It is not a
* general CODEC device driver.
*
*---------------------------------------------------------------------------*/
#ifndef __WMINTERRUPTS_H__
#define __WMINTERRUPTS_H__
/*
* Include files
*/
#include "WMStatus.h"
#if WM_INLINE_FUNCTIONS
# include "WMInterrupts_Raw.h"
#endif
/*
* Definitions
*/
/*
* Function prototypes
*/
#ifdef __cplusplus
extern "C" {
#endif
#if !WM_INLINE_FUNCTIONS
/*-----------------------------------------------------------------------------
* Function: WMEnablePenInterrupt
*
* Requests an interrupt when the pen detect GPIO triggers.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMEnablePenInterrupt( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMDisablePenInterrupt
*
* Cancels the interrupt when the pen detect GPIO triggers.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMDisablePenInterrupt( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMMaskPenInterrupt
*
* Masks (disables) or unmasks (enables) the pen detect interrupt.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* mask whether to mask or unmask
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMMaskPenInterrupt( WM_DEVICE_HANDLE hDevice, WM_BOOL mask );
/*-----------------------------------------------------------------------------
* Function: WMIsPenInterruptTriggered
*
* Returns whether the pen detect GPIO interrupt is currently triggered.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: int
* Non-zero = interrupt triggered.
*---------------------------------------------------------------------------*/
int WMIsPenInterruptTriggered( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMClearPenInterrupt
*
* Clears the pen detect GPIO interrupt.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMClearPenInterrupt( WM_DEVICE_HANDLE hDevice );
#if WM_USE_VIRTUAL_PENDOWN
/*-----------------------------------------------------------------------------
* Function: WMClearVirtualPendown
*
* Clears the virtual pen detect GPIO interrupt.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
* penDown TRUE to clear pen down interrupt.
* FALSE to clear pen up interrupt.
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMClearVirtualPendown( WM_DEVICE_HANDLE hDevice, WM_BOOL penDown );
#endif /* WM_USE_VIRTUAL_PENDOWN */
/*-----------------------------------------------------------------------------
* Function: WMRequestTimerInterrupt
*
* Requests a timer interrupt after the specified interval. This is given as
* a fraction of a second (i.e. timer frequency).
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: WMSTATUS
* See WMStatus.h
*---------------------------------------------------------------------------*/
void WMRequestTimerInterrupt( WM_DEVICE_HANDLE hDevice );
/*-----------------------------------------------------------------------------
* Function: WMCancelTimerInterrupt
*
* Ensures previously requested timer interrupts are cancelled.
*
* Parameters:
* hDevice handle to the device (from WMOpenDevice)
*
* Returns: void
*---------------------------------------------------------------------------*/
void WMCancelTimerInterrupt( WM_DEVICE_HANDLE hDevice );
#endif /* WM_INLINE_FUNCTIONS */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __WMINTERRUPTS_H__ */
/*------------------------------ END OF FILE ---------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -