Old fashion design for PC-104
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.

65 lines
1.3 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT: Laserguard libraries
  7. // SUBSYSTEM: Devices support library
  8. // FILE: LgDeviceGPIOCOM.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of CLgDeviceGPIOCOM
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__DEVICE__GPIO__COM__H__INCLUDED__
  15. #define __LG__DEVICE__GPIO__COM__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "LgDeviceGPIO.h"
  20. class CLgDeviceGPIOCOM :
  21. public CLgDeviceGPIO
  22. {
  23. public:
  24. CLgDeviceGPIOCOM();
  25. virtual ~CLgDeviceGPIOCOM();
  26. public:
  27. BOOL Create( LPCTSTR pPort, BOOL bSelfTest, INT nSelfTestTimeout );
  28. void Destroy();
  29. protected:
  30. virtual BOOL ReadWriteProc();
  31. private:
  32. typedef struct GISTEREZIS
  33. {
  34. BOOL bCurrentOn;
  35. BOOL bSavedOn;
  36. LARGE_INTEGER liTime;
  37. }GISTEREZIS;
  38. private:
  39. enum { GPIO_COM_INFINITE = 200 };
  40. GISTEREZIS m_pGisteresis[4];
  41. private:
  42. HANDLE m_hCommPort;
  43. DWORD m_dwInputStatus;
  44. private:
  45. BOOL m_pOutput[2];
  46. private:
  47. static DWORD s_dwControlBits[];
  48. private:
  49. BOOL m_bSelfTest;
  50. INT m_nSelfTestTimeout;
  51. };
  52. #endif