wiegand.h 699 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. class WIEGAND {
  3. public:
  4. WIEGAND();
  5. void begin();
  6. void end();
  7. bool available();
  8. unsigned long getCode();
  9. unsigned long getCodeHigh();
  10. int getWiegandType();
  11. static void ReadD0();
  12. static void ReadD1();
  13. private:
  14. static bool DoWiegandConversion();
  15. static unsigned long
  16. GetCardId(volatile unsigned long* codehigh, volatile unsigned long* codelow, char bitlength);
  17. static volatile unsigned long _cardTempHigh;
  18. static volatile unsigned long _cardTemp;
  19. static volatile unsigned long _lastWiegand;
  20. static volatile int _bitCount;
  21. static int _wiegandType;
  22. static unsigned long _code;
  23. static unsigned long _codeHigh;
  24. };