mirror of
https://github.com/Vale54321/schafkopf-bot.git
synced 2025-12-16 03:39:34 +01:00
added arduino nfcReader files (#42)
This commit is contained in:
committed by
GitHub
parent
76cb0eaf1a
commit
6259d0bef3
20
Arduino/nfcReader/PN532/mac_link.cpp
Normal file
20
Arduino/nfcReader/PN532/mac_link.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#include "mac_link.h"
|
||||
#include "PN532_debug.h"
|
||||
|
||||
int8_t MACLink::activateAsTarget(uint16_t timeout)
|
||||
{
|
||||
pn532.begin();
|
||||
pn532.SAMConfig();
|
||||
return pn532.tgInitAsTarget(timeout);
|
||||
}
|
||||
|
||||
bool MACLink::write(const uint8_t *header, uint8_t hlen, const uint8_t *body, uint8_t blen)
|
||||
{
|
||||
return pn532.tgSetData(header, hlen, body, blen);
|
||||
}
|
||||
|
||||
int16_t MACLink::read(uint8_t *buf, uint8_t len)
|
||||
{
|
||||
return pn532.tgGetData(buf, len);
|
||||
}
|
||||
Reference in New Issue
Block a user