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

📄 dmawince.h

📁 编译环境为PB,或AK,实现27x平台上对DMA的控制,由于270平台上DMA都处在同一个一级中断下,要使用单个的DMA通道,通常也可以在OAL重新映射其中断号,但比较费事,本驱动实现对DMA的管理,
💻 H
字号:
/******************************************************************************
**
**  COPYRIGHT (C) 2001, 2002 Intel Corporation.
**
**  This software as well as the software described in it 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 Intel Corporation. Intel Corporation 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 Intel Corporation. 
**
**  FILENAME:       dmawince.h
**
**  PURPOSE: Header file for dmawince.c
**                  
******************************************************************************/


#ifndef __DMAWINCE_H__
#define __DMAWINCE_H__
//
// DMA controller mutex to guard against concurrency
//
#define DMAC_MUTEX_NAME			TEXT("DMAC")
#define DMAC_MUTEX_TIMEOUT		1000	//uSeconds


BOOL WINAPI DllMain
(
    HANDLE  hinstDLL,
    DWORD   Op,
    LPVOID  lpvReserved
);


XLLP_STATUS_T	XllpDmacInit
(
);

BOOL XllpDmacAcquireMutex
(    
    HANDLE  *hDmacMutex,
    DWORD   timeout
);

VOID XllpDmacFreeMutex
(    
    HANDLE  hDmacMutex
);

VOID* OSMemAlloc
(
    UINT32   numBytes
);

VOID OSMemFree
(
    VOID*           memPtr
);

XLLP_UINT32_T OSGetMaxPages
(
    XLLP_UINT8_T    *pBuffer,
    XLLP_UINT32_T   bufferLength
);

BOOL OSLockPhysicalPages
(
    VOID*           virtualAddress,
    XLLP_UINT32_T   numBytesToLock,
    XLLP_UINT32_T   *pageAddresses,
    XLLP_UINT32_T   osFlags
);

BOOL OSUnlockPhysicalPages
(
    VOID*           virtualAddress,
    XLLP_UINT32_T   numBytesToUnlock
);


#endif

⌨️ 快捷键说明

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