wiegand.h 721 B

123456789101112131415161718192021222324252627282930
  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 GetCardId(
  16. volatile unsigned long* codehigh,
  17. volatile unsigned long* codelow,
  18. char bitlength);
  19. static volatile unsigned long _cardTempHigh;
  20. static volatile unsigned long _cardTemp;
  21. static volatile unsigned long _lastWiegand;
  22. static volatile int _bitCount;
  23. static int _wiegandType;
  24. static unsigned long _code;
  25. static unsigned long _codeHigh;
  26. };