Click here to Skip to main content
15,896,118 members
Articles / Programming Languages / C

Access Physical Memory, Port and PCI Configuration Space

Rate me:
Please Sign up or sign in to vote.
4.95/5 (34 votes)
13 Apr 2009CPOL4 min read 228.1K   6.8K   98  
Play with physical memory, port, PCI configuration space in user mode
//////////////////////////////////////////////////////////////////////////////
//	Copyright � 1998,1999 PHD Computer Consultants Ltd
//	DebugPrint code header to add to a test driver
//
/////////////////////////////////////////////////////////////////////////////

#ifdef __cplusplus
extern "C"
{
#endif

#define DEBUGPRINT 0	// Set to 1 to do DebugPrints in free version

/////////////////////////////////////////////////////////////////////////////

#if DBG || DEBUGPRINT
#define DODEBUGPRINT 1
#else
#define DODEBUGPRINT 0
#endif

#if DODEBUGPRINT

void DebugPrintInit(char*);
void DebugPrintClose();
void DebugPrintMsg(char*);

#else

#define DebugPrintInit(x)
#define DebugPrintClose()
#define DebugPrintMsg(x)

#endif

void DebugPrint2(int max, const char *format, ... );
void DebugPrint(const char *format, ... );

/////////////////////////////////////////////////////////////////////////////

#ifdef __cplusplus
}
#endif

/////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
China China
From Shanghai, China

Comments and Discussions