📄 wdc_err.h
字号:
#ifndef _WDC_ERR_H_
#define _WDC_ERR_H_
/****************************************************************
* File: wdc_err.h - WD card (WDC) internal error handling API *
* (for use only by the WDC library) *
* *
* Copyright (c) 2005 Jungo Ltd. http://www.jungo.com *
*****************************************************************/
#if !defined (__KERNEL__)
#include <stdio.h>
#else
#include "kpstdlib.h"
#endif
#include <stdarg.h>
#include "utils.h"
#include "wdc_lib.h"
/*************************************************************
Static inline functions implementations
**************************************************************/
/* -----------------------------------------------
Debugging and error handling
----------------------------------------------- */
void WdcSetLastErrStr(const CHAR *format, ...);
const CHAR *WdcGetLastErrStr(void);
/* [Additional error handling function prototypes are declared in wdc_lib.h] */
/* -----------------------------------------------
Variables validation
----------------------------------------------- */
static inline BOOL WdcIsValidPtr(PVOID ptr, const CHAR *sErrMssg)
{
if (!ptr)
{
WdcSetLastErrStr("Error - %s\n", sErrMssg);
return FALSE;
}
return TRUE;
}
static inline BOOL WdcIsValidDevHandle(WDC_DEVICE_HANDLE hDev)
{
return WdcIsValidPtr(hDev, "Invalid device handle");
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -