driver_api.h

来自「cache test for arm920 core」· C头文件 代码 · 共 51 行

H
51
字号
//==================================================================// //  FILE:           driver_api.h////  DESCRIPTION:    Driver API definition////  Copyright Cirrus Logic Corporation, 2001.  All rights reserved////==================================================================#ifndef _VS_DRIVER_API_H_#define _VS_DRIVER_API_H_#include "vs_types.h"//-----------------------------------------------------------------------------// VS_DRIVER_API//-----------------------------------------------------------------------------// Driver API is a data structure that contains methods and attributes for // operating a device for normal use.  The description below defines each // member of the structure.  All member functions should be implemented and // should not be set to 0.  The 'param' can be pointer to any data structure,// as long as the calling program and the subroutine agree on the type of // 'param' and  cast them appropriately.  //// "Member" functions// ------------------//// Open//    This function opens an instance of a driver given the parameters that//      are passed in to the *param value. //// Ioctl//    A generic ioctl function whose behavior depends on the value 'ioctl'.  //      Each module should define its own set of ioctl values, and these values//      should be published in the module header file.//   // Close//    Function that closes an instance of a driver.//    // GetLastError//    Function that returns the error number caused by the last error.//typedef struct _VS_DRIVER_API{    HANDLE (*Open)(void *param);    INT (*Ioctl)(HANDLE Handle, UINT ioctl, void *param);    INT (*Close)(HANDLE Handle);    INT (*GetLastError)(HANDLE Handle);} VS_DRIVER_API;#endif // _VS_DRIVER_API_H_

⌨️ 快捷键说明

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