diff --git a/brmdoor_nfc.cpp b/brmdoor_nfc.cpp index 1f4eb93..65fd701 100644 --- a/brmdoor_nfc.cpp +++ b/brmdoor_nfc.cpp @@ -1,14 +1,32 @@ #include +#include +#include + + #include "brmdoor_nfc.h" using namespace std; NFCDevice::NFCDevice() { + pollNr = 20; + pollPeriod = 2; } std::string NFCDevice::scanUID() { return "1234"; } + +const nfc_modulation NFCDevice::_modulations[5] = { + { /*.nmt = */ NMT_ISO14443A, /* .nbr = */ NBR_106 }, + { /*.nmt = */ NMT_ISO14443B, /* .nbr = */ NBR_106 }, + { /*.nmt = */ NMT_FELICA, /* .nbr = */ NBR_212 }, + { /*.nmt = */ NMT_FELICA, /* .nbr = */ NBR_424 }, + { /*.nmt = */ NMT_JEWEL, /* .nbr = */ NBR_106 }, + }; + +const size_t _modulationsLen = 5; + + diff --git a/brmdoor_nfc.h b/brmdoor_nfc.h index a1fbd6a..db5698b 100644 --- a/brmdoor_nfc.h +++ b/brmdoor_nfc.h @@ -1,6 +1,10 @@ #pragma once #include +#include + +#include +#include class NFCDevice { @@ -12,4 +16,14 @@ public: ~NFCDevice() {} std::string scanUID(); + + uint8_t pollNr; + + uint8_t pollPeriod; + +protected: + + static const nfc_modulation _modulations[5]; + static const size_t _modulationsLen = 5; + };