wiegand.h 683 B

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