📄 smcsw.h
字号:
//
// Copyright(C) Renesas Technology Corp. 2002-2005. All rights reserved.
//
// LAN91C111 Ether Debug Library for ITS-DS7
//
// FILE : smcsw.h
// CREATED : 2002.07.24
// MODIFIED : 2004.09.01
// AUTHOR : Renesas Technology Corp.
// HARDWARE : RENESAS ITS-DS7
// HISTORY :
// 2004.09.01
// - Created release code.
// (based on ITS-DS7 Source Kit Ver.1.0.2 for WCE4.2)
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Module Name:
smcsw.h
Abstract:
Definitions for the SMC9000 ethernet controller used for the debug
ethernet services.
Notes:
--*/
#ifndef _SMCSW_H
#define _SMCSW_H 1
// Macros for I/O access. Change this to use ceddk.h, once the macros are added
#if x86
unsigned short __cdecl _inpw(unsigned short);
unsigned short __cdecl _outpw(unsigned short, unsigned short);
#define READ_PORT_USHORT(port) _inpw((USHORT)port)
#define WRITE_PORT_USHORT(port, value) _outpw((USHORT)port, (value))
#else
#define READ_PORT_USHORT(port) (*(volatile USHORT * const)(port))
#define WRITE_PORT_USHORT(port, value) (*(volatile USHORT * const)(port) = value)
#endif
// Debug defs (zone defs in ethdbg.h). EdbgOutputDebugString is a function
// in ethdbg.lib which will format and print a string to the debug serial port.
extern DWORD EdbgDebugZone;
#ifdef DEBUG
#define EDBG_DEBUGMSG(mask,printf_exp) ((void)((EdbgDebugZone&mask)?(EdbgOutputDebugString printf_exp),1:0))
#define EDBG_ADAPTERMSG(mask,printf_exp) ((void)(((EdbgDebugZone&(ZONE_ADAPTER|mask)) == (ZONE_ADAPTER|mask))?(EdbgOutputDebugString printf_exp),1:0))
#else
#define EDBG_DEBUGMSG(mask,printf_exp)
#define EDBG_ADAPTERMSG(mask,printf_exp)
#endif
#ifdef UNDER_CE
// Defs for debug LEDs. Add an offset so we can easily filter on adapter LED writes
// Defs for WriteDebugLED
VOID SC_WriteDebugLED(WORD wIndex, DWORD dwPattern);
#define EDBG_DEBUGLED(offset, value) ((void)((EdbgDebugZone&ZONE_LEDS)? SC_WriteDebugLED(offset,value),1:0))
#define ADAPTER_OFFSET (0x100/4)
#define LED_GETFRAME_ENTRY (ADAPTER_OFFSET+1)
#define LED_GETFRAME_EXIT (ADAPTER_OFFSET+2)
#define LED_SENDFRAME_ENTRY (ADAPTER_OFFSET+3)
#define LED_SENDFRAME_EXIT (ADAPTER_OFFSET+4)
#define LED_COPY (ADAPTER_OFFSET+5)
#define LED_PKTLEN (ADAPTER_OFFSET+6)
#define LED_OVERRUN (ADAPTER_OFFSET+7)
#else
#define EDBG_DEBUGLED(offset, value)
#endif // UNDER_CE
#endif // _SMCSW_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -