mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-09 00:44:13 +02:00
Damn scalar initializers
This commit is contained in:
parent
cafd967ed6
commit
cb05d5a063
2 changed files with 32 additions and 0 deletions
|
@ -1,14 +1,32 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <nfc/nfc.h>
|
||||||
|
#include <nfc/nfc-types.h>
|
||||||
|
|
||||||
|
|
||||||
#include "brmdoor_nfc.h"
|
#include "brmdoor_nfc.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
NFCDevice::NFCDevice()
|
NFCDevice::NFCDevice()
|
||||||
{
|
{
|
||||||
|
pollNr = 20;
|
||||||
|
pollPeriod = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string NFCDevice::scanUID()
|
std::string NFCDevice::scanUID()
|
||||||
{
|
{
|
||||||
return "1234";
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include <nfc/nfc.h>
|
||||||
|
#include <nfc/nfc-types.h>
|
||||||
|
|
||||||
class NFCDevice
|
class NFCDevice
|
||||||
{
|
{
|
||||||
|
@ -12,4 +16,14 @@ public:
|
||||||
~NFCDevice() {}
|
~NFCDevice() {}
|
||||||
|
|
||||||
std::string scanUID();
|
std::string scanUID();
|
||||||
|
|
||||||
|
uint8_t pollNr;
|
||||||
|
|
||||||
|
uint8_t pollPeriod;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
static const nfc_modulation _modulations[5];
|
||||||
|
static const size_t _modulationsLen = 5;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue