📄 io.h
字号:
//#include <windows.h>
/*
extern void WINAPI PortOut(short int Port, char Data);
extern void WINAPI PortWordOut(short int Port, short int Data);
extern void WINAPI PortDWordOut(short int Port, int Data);
extern char WINAPI PortIn(short int Port);
extern short int WINAPI PortWordIn(short int Port);
extern int WINAPI PortDWordIn(short int Port);
extern void WINAPI SetPortBit(short int Port, char Bit);
extern void WINAPI ClrPortBit(short int Port, char Bit);
extern void WINAPI NotPortBit(short int Port, char Bit);
extern short int WINAPI GetPortBit(short int Port, char Bit);
extern short int WINAPI RightPortShift(short int Port, short int Val);
extern short int WINAPI LeftPortShift(short int Port, short int Val);
extern short int WINAPI IsDriverInstalled();
*/
/*
extern "C" void PortOut(short int Port, char Data);
extern "C" void PortWordOut(short int Port, short int Data);
extern "C" void PortDWordOut(short int Port, int Data);
extern "C" char PortIn(short int Port);
extern "C" short int PortWordIn(short int Port);
extern "C" int PortDWordIn(short int Port);
extern "C" void SetPortBit(short int Port, char Bit);
extern "C" void ClrPortBit(short int Port, char Bit);
extern "C" void NotPortBit(short int Port, char Bit);
extern "C" short int GetPortBit(short int Port, char Bit);
extern "C" short int RightPortShift(short int Port, short int Val);
extern "C" short int LeftPortShift(short int Port, short int Val);
extern "C" short int IsDriverInstalled();
*/
typedef void (WINAPI *PORTOUT) (short int Port, char Data);
typedef void (WINAPI *PORTWORDOUT)(short int Port, short int Data);
typedef void (WINAPI *PORTDWORDOUT)(short int Port, int Data);
typedef char (WINAPI *PORTIN) (short int Port);
typedef short int (WINAPI *PORTWORDIN)(short int Port);
typedef int (WINAPI *PORTDWORDIN)(short int Port);
typedef void (WINAPI *SETPORTBIT)(short int Port, char Bit);
typedef void (WINAPI *CLRPORTBIT)(short int Port, char Bit);
typedef void (WINAPI *NOTPORTBIT)(short int Port, char Bit);
typedef short int (WINAPI *GETPORTBIT)(short int Port, char Bit);
typedef short int (WINAPI *RIGHTPORTSHIFT)(short int Port, short int Val);
typedef short int (WINAPI *LEFTPORTSHIFT)(short int Port, short int Val);
typedef short int (WINAPI *ISDRIVERINSTALLED)();
extern PORTOUT PortOut;
extern PORTWORDOUT PortWordOut;
extern PORTDWORDOUT PortDWordOut;
extern PORTIN PortIn;
extern PORTWORDIN PortWordIn;
extern PORTDWORDIN PortDWordIn;
extern SETPORTBIT SetPortBit;
extern CLRPORTBIT ClrPortBit;
extern NOTPORTBIT NotPortBit;
extern GETPORTBIT GetPortBit;
extern RIGHTPORTSHIFT RightPortShift;
extern LEFTPORTSHIFT LeftPortShift;
extern ISDRIVERINSTALLED IsDriverInstalled;
extern HMODULE hio;
extern void UnloadIODLL();
extern int LoadIODLL();
//extern unsigned char f_I2C_Error;
struct IICaddress
{
short int LPTaddress;
char NoBit;
unsigned char CPLflag;
};
//extern IICaddress SDA_Out;
//extern IICaddress SDA_In;
//extern IICaddress SCL_Out;
//extern IICaddress SCL_In;
/*
void LPT_WriteByte( short int address, char data);
char LPT_ReadByte( short int address);
unsigned char IicReadByte( unsigned char SlaveAddr, unsigned char RegAddr );
void IicWriteByte( unsigned char SlaveAddr, unsigned char RegAddr, unsigned char RegData );
void IicAckTest( unsigned char SlaveAddr );
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -