📄 davicom.h
字号:
/* Davicom.h: Common interface for the all project. */
/* */
/*//////////////////////////////////////////////////////////////////////////////*/
/*==============================================================================*/
/* Class Name : */
/* Purpose : */
/* Autor : Richard Chuang */
/* Email : */
/* Description : */
/* Reference : */
/* Copyright : Copyright (c) 2000-2007 Davicom Inc. All rights reserved. */
/* -----------------------------------------------------------------------------*/
/* Version : 1.0.1.0 */
/* Update : 2007-12-18 */
/* Modified : Richard Chung */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* How to use: */
/* - Enable Davicom Debug Mode */
/* sources(makefile) */
/* DAVICOM_DEBUG_MODE declares in CDEFINES that will enable debug mode */
/* _WIN32_CE_ETHDBG declares in CDEFINES that will enable ETHDBG mode */
/* Ex.CDEFINES=$(CDEFINES) -DDAVICOM_DEBUG_MODE -D_WIN32_CE_ETHDBG */
/* source code files(c/cpp/h) */
/* DAVICOM_DEBUG_MODE declares in file that will enable debug mode */
/* _WIN32_CE_ETHDBG declares in the file that will enable ETHDBG mode */
/* Ex.#define DAVICOM_DEBUG_MODE 1 // Enable */
/* Ex.#define _WIN32_CE_ETHDBG 1 // ETHDBG Mode */
/* _PRINTF */
/* */
/* [Use '#' to comment, to get release mode] */
/* [# CDEFINES=$(CDEFINES) -DDAVICOM_DEBUG_MODE ] */
/*==============================================================================*/
/* Function Name: EdbgOutputDebugString/KITLOutputDebugString */
/* void EdbgOutputDebugString(const char *fmt, ...); */
/* void KITLOutputDebugString(const char *fmt, ...); */
/* -----------------------------------------------------------------------------*/
/* void EdbgOutputDebugString(Print messages to the debug serial port) */
/* */
/* This function is provided to allow debugging of the debug Ethernet services. */
/* It will format and print a message to the debug serial port, even if debug */
/* messages (i.e. NKDbgPrintfW) are routed over Ethernet. */
/* If the debugger is running over the serial port, the message will be */
/* formatted such that it shows up in the debugger output window. */
/* The formatting capabilities of this function are limited to the following */
/* format characters: */
/* */
/* Various format for printf. */
/* This was needed because Windows CE version of printf gives me a different */
/* Set of format strings than those given by standard C compiler. */
/* */
/* Format string : type */
/* */
/* u : unsigned <nl> */
/* d : int <nl> */
/* c : char <nl> */
/* s : string <nl> */
/* x : 4-bit hex number <nl> */
/* B : 8-bit hex number <nl> <== "%02x" */
/* H : 16-bit hex number <nl> <== "%04x" */
/* X : 32-bit hex number <nl> <== "%08x" */
/* */
/* EdbgOutputDebugString() will eventually call the OEMWriteDebugByte() */
/* function to write characters to the debug serial port. */
/* */
/*==============================================================================*/
/* Function Name: UCHAR READ_PORT_UCHAR/ */
/* */
/* */
/* */
/*==============================================================================*/
/* Function Name: UCHAR READ_PORT_UCHAR */
/* Purpose : This function reads a byte from the specified port address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : UCHAR READ_PORT_UCHAR(PUCHAR Port); */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* in I/O space. */
/* Return Values: Returns the byte read from the specified port address. */
/*==============================================================================*/
/* Function Name: WRITE_PORT_UCHAR */
/* Purpose : This function writes a byte to the specified port address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : VOID WRITE_PORT_UCHAR(PUCHAR Port, UCHAR Value ); */
/* */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* : in I/O space. */
/* Value : [in] Byte to be written to the port. */
/* Return Values: None. */
/*==============================================================================*/
/* Function Name: READ_PORT_USHORT */
/* Purpose : This function reads a USHORT value from the specified port */
/* address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : USHORT READ_PORT_USHORT(PUSHORT Port ); */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* in I/O space. */
/* Return Values: Returns the USHORT value read from the specified port address.*/
/*==============================================================================*/
/* Function Name: WRITE_PORT_USHORT */
/* Purpose : This function writes a USHORT value to the specified port */
/* address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : VOID WRITE_PORT_USHORT(PUSHORT Port, USHORT Value ); */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* in I/O space. */
/* Value : [in] USHORT value to write to the port. */
/* Return Values: None. */
/*==============================================================================*/
/* Function Name: USHORT READ_PORT_USHORT */
/* Purpose : This function reads a USHORT value from the specified port */
/* address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : USHORT READ_PORT_USHORT(PUSHORT Port ); */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* : in I/O space. */
/* Return Values: Returns the USHORT value read from the specified port address.*/
/* */
/*==============================================================================*/
/* Function Name: WRITE_PORT_USHORT */
/* Purpose : This function writes a USHORT value to the specified port */
/* : address. */
/* Description : */
/* -----------------------------------------------------------------------------*/
/* Prototype : VOID WRITE_PORT_USHORT(PUSHORT Port, USHORT Value ); */
/* Parameters : */
/* Port : [in] Pointer to the port that must be a mapped memory range */
/* : in I/O space. */
/* Value : [in] USHORT value to write to the port. */
/* Return Values: None. */
#if !defined(_DAVICOM_COMMON_DEFINE_H_)
#define _DAVICOM_COMMON_DEFINE_H_
#if _MSC_VER > 1000
#pragma once
#endif /* _MSC_VER > 1000 */
//#define IMPL_FIBER_MODE
//#define IMPL_TST_FORCE_100H
//#define PARAM_100H 0x2000
//#define PARAM_10H 0x0000 //[10M Instead of 100M]
#ifdef SETFNAME
#undef SETFNAME
#endif
#ifdef FUNCTION_ENTER_MSG
#undef FUNCTION_ENTER_MSG
#endif
#ifdef FUNCTION_LEAVE_MSG
#undef FUNCTION_LEAVE_MSG
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -