📄 gpio_i2c.h
字号:
extern "C" unsigned char OperationDEMO(T_OPERA_MODE operation, unsigned char *data, unsigned char numBytes);
/////////////////////////////////////////////////////////////////////
extern "C" BOOL CALLBACK DllMain(HANDLE hDLL,DWORD dwReason,LPVOID lpvReserved);
//////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
// @xref <nl>
// <f DEMO_Init>, <nl>
// <f DEMO_Deinit>, <nl>
// <f DEMO_Open>, <nl>
// <f DEMO_Close>, <nl>
// <f DEMO_Read>, <nl>
// <f DEMO_Write>, <nl>
// <f DEMO_Seek>, <nl>
// <f DEMO_PowerUp>, <nl>
// <f DEMO_PowerDown>, <nl>
// <f DEMO_IOControl> <nl>
//
// -----------------------------------------------------------------------------
extern "C" DWORD DEMO_Init(DWORD Index);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func PVOID | DEMO_Deinit | Device deinitialization routine
//
// @parm DWORD | dwData | value returned from DEMO_Init call
//
// @rdesc Returns TRUE for success, FALSE for failure.
//
// -----------------------------------------------------------------------------
//extern "C" BOOL DEMO_Deinit(DWORD dwData);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func PVOID | DEMO_Open | Device open routine
//
// @parm DWORD | dwData | Value returned from DEMO_Init call (ignored)
//
// @parm DWORD | dwAccess | Requested access (combination of GENERIC_READ
// and GENERIC_WRITE) (ignored)
//
// @parm DWORD | dwShareMode | Requested share mode (combination of
// FILE_SHARE_READ and FILE_SHARE_WRITE) (ignored)
//
// @rdesc Returns a DWORD which will be passed to Read, Write, etc or NULL if
// unable to open device.
//
// -----------------------------------------------------------------------------
extern "C" PDWORD DEMO_Open( DWORD dwData,
DWORD dwAccess,
DWORD dwShareMode);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func BOOL | DEMO_Close | Device close routine
//
// @parm DWORD | dwOpenData | Value returned from DEMO_Open call
//
// @rdesc Returns TRUE for success, FALSE for failure
//
// -----------------------------------------------------------------------------
//extern "C" BOOL DEMO_Close(PDWORD pdwData);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func DWORD | DEMO_Read | Device read routine
//
// @parm DWORD | dwOpenData | Value returned from DEMO_Open call (ignored)
//
// @parm LPVOID | pBuf | Buffer to receive data (ignored)
//
// @parm DWORD | len | Maximum length to read (ignored)
//
// @rdesc Returns 0 always. DEMO_Read should never get called and does
// nothing. Required DEVICE.EXE function, but all data communication
// is handled by <f DEMO_IOControl>.
//
// -----------------------------------------------------------------------------
extern "C" DWORD DEMO_Read(DWORD dwData,
LPVOID pBuf,
DWORD Len);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func DWORD | DEMO_Write | Device write routine
//
// @parm DWORD | dwOpenData | Value returned from DEMO_Open call (ignored)
//
// @parm LPCVOID | pBuf | Buffer containing data (ignored)
//
// @parm DWORD | len | Maximum length to write (ignored)
//
// @rdesc Returns 0 always. DEMO_Write should never get called and does
// nothing. Required DEVICE.EXE function, but all data communication
// is handled by <f DEMO_IOControl>.
//
// -----------------------------------------------------------------------------
extern "C" DWORD DEMO_Write(DWORD dwData,
LPCVOID pBuf,
DWORD Len);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func DWORD | DEMO_Seek | Device seek routine
//
// @parm DWORD | dwOpenData | Value returned from DEMO_Open call (ignored)
//
// @parm long | pos | Position to seek to (relative to type) (ignored)
//
// @parm DWORD | type | FILE_BEGIN, FILE_CURRENT, or FILE_END (ignored)
//
// @rdesc Returns -1 always. DEMO_Seek should never get called and does
// nothing. Required DEVICE.EXE function, but all data communication
// is handled by <f DEMO_IOControl>.
//
// -----------------------------------------------------------------------------
extern "C" DWORD DEMO_Seek(DWORD dwData,
long pos,
DWORD type);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func void | DEMO_PowerUp | Device powerup routine
//
// @comm Called to restore device from suspend mode. Cannot call any
// routines aside from those in the dll in this call.
//
// -----------------------------------------------------------------------------
extern "C" VOID DEMO_PowerUp(VOID);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func void | DEMO_PowerDown | Device powerdown routine
//
// @comm Called to suspend device. Cannot call any routines aside from
// those in the dll in this call.
//
// -----------------------------------------------------------------------------
//extern "C" VOID DEMO_PowerDown(VOID);
// -----------------------------------------------------------------------------
//
// @doc WDEV_EXT
//
// @func BOOL | DEMO_IOControl | Device IO control routine
//
// @parm DWORD | dwOpenData | Value returned from DEMO_Open call
//
// @parm DWORD | dwCode |
// IO control code for the function to be performed. DEMO_IOControl only
// supports one IOCTL value (IOCTL_DEMO_MESSAGE)
//
// @parm PBYTE | pBufIn |
// Pointer to the input parameter structure (<t MMDRV_MESSAGE_PARAMS>).
//
// @parm DWORD | dwLenIn |
// Size in bytes of input parameter structure (sizeof(<t MMDRV_MESSAGE_PARAMS>)).
//
// @parm PBYTE | pBufOut | Pointer to the return value (DWORD).
//
// @parm DWORD | dwLenOut | Size of the return value variable (sizeof(DWORD)).
//
// @parm PDWORD | pdwActualOut | Unused
//
// @rdesc Returns TRUE for success, FALSE for failure
//
// @xref <t DEMOe Input Driver Messages> (WIDM_XXX) <nl>
// <t DEMOe Output Driver Messages> (WODM_XXX)
//
// -----------------------------------------------------------------------------
extern "C" BOOL DEMO_IOControl(PDWORD pdwOpenData,
DWORD dwCode,
PBYTE pBufIn,
DWORD dwLenIn,
PBYTE pBufOut,
DWORD dwLenOut,
PDWORD pdwActualOut);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -