2021-04-28 15:13:25 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class WIEGAND {
|
|
|
|
public:
|
|
|
|
WIEGAND();
|
|
|
|
void begin();
|
2021-05-24 12:57:14 +03:00
|
|
|
void end();
|
2021-04-28 15:13:25 +03:00
|
|
|
bool available();
|
|
|
|
unsigned long getCode();
|
|
|
|
unsigned long getCodeHigh();
|
|
|
|
int getWiegandType();
|
|
|
|
|
|
|
|
static void ReadD0();
|
|
|
|
static void ReadD1();
|
|
|
|
|
|
|
|
private:
|
|
|
|
static bool DoWiegandConversion();
|
2021-07-01 03:45:20 +03:00
|
|
|
static unsigned long GetCardId(
|
|
|
|
volatile unsigned long* codehigh,
|
|
|
|
volatile unsigned long* codelow,
|
|
|
|
char bitlength);
|
2021-04-28 15:13:25 +03:00
|
|
|
|
|
|
|
static volatile unsigned long _cardTempHigh;
|
|
|
|
static volatile unsigned long _cardTemp;
|
|
|
|
static volatile unsigned long _lastWiegand;
|
|
|
|
static volatile int _bitCount;
|
|
|
|
static int _wiegandType;
|
|
|
|
static unsigned long _code;
|
|
|
|
static unsigned long _codeHigh;
|
2022-05-06 16:37:10 +03:00
|
|
|
};
|