You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.8 KiB
80 lines
1.8 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT: Laserguard libraries
|
|
// SUBSYSTEM: Devices support library
|
|
// FILE: LgDeviceGPIOLPT.h
|
|
// AUTHOR: Chizhevskiy Sergey
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of CLgDeviceGPIOLPT
|
|
//----------------------------------------------------------------------------
|
|
|
|
#ifndef __LG__DEVICE__PARALLEL__PORT__GPIO__H__INCLUDED__
|
|
#define __LG__DEVICE__PARALLEL__PORT__GPIO__H__INCLUDED__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "LgDeviceGPIO.h"
|
|
|
|
class CLgDeviceGPIOLPT :
|
|
public CLgDeviceGPIO
|
|
{
|
|
public:
|
|
CLgDeviceGPIOLPT();
|
|
virtual ~CLgDeviceGPIOLPT();
|
|
|
|
public:
|
|
enum
|
|
{
|
|
GPIO_LPT_I_ERROR = 0x08,
|
|
GPIO_LPT_I_SELECT = 0x10,
|
|
GPIO_LPT_I_PAPEREND = 0x20,
|
|
GPIO_LPT_I_ASK = 0x40,
|
|
GPIO_LPT_I_BUZY = 0x80,
|
|
|
|
GPIO_LPT_IO_DATA_0 = 0x01 << 8,
|
|
GPIO_LPT_IO_DATA_1 = 0x02 << 8,
|
|
GPIO_LPT_IO_DATA_2 = 0x04 << 8,
|
|
GPIO_LPT_IO_DATA_3 = 0x08 << 8,
|
|
GPIO_LPT_IO_DATA_4 = 0x10 << 8,
|
|
GPIO_LPT_IO_DATA_5 = 0x20 << 8,
|
|
GPIO_LPT_IO_DATA_6 = 0x40 << 8,
|
|
GPIO_LPT_IO_DATA_7 = 0x80 << 8,
|
|
};
|
|
|
|
public:
|
|
BOOL Create( LPCTSTR pPort, BOOL bDataOutput );
|
|
void Destroy();
|
|
|
|
protected:
|
|
virtual BOOL ReadWriteProc();
|
|
|
|
private:
|
|
BOOL m_bDataOutput;
|
|
INT m_BaseAddress;
|
|
DWORD m_dwInputState;
|
|
DWORD m_dwOutputState;
|
|
DWORD m_dwSavedState;
|
|
|
|
private:
|
|
typedef struct GISTEREZIS
|
|
{
|
|
BOOL bCurrentOn;
|
|
BOOL bSavedOn;
|
|
LARGE_INTEGER liTime;
|
|
}GISTEREZIS;
|
|
|
|
private:
|
|
GISTEREZIS m_pGisterezis[13];
|
|
|
|
private:
|
|
static DWORD s_bControlBits[13];
|
|
static BOOL s_bInvertBits[13];
|
|
};
|
|
|
|
#endif
|