NFC library using PN532 to read/write NDEF Messages to NFC tags
Dependents: Seeed_NFC_Shield_write Nucleo_test_nfc
Fork of PN532 by
mac_link.cpp
00001 00002 #include "mac_link.h" 00003 #include "PN532_debug.h" 00004 00005 int8_t MACLink::activateAsTarget(uint16_t timeout) 00006 { 00007 pn532.begin(); 00008 pn532.SAMConfig(); 00009 return pn532.tgInitAsTarget(timeout); 00010 } 00011 00012 bool MACLink::write(const uint8_t *header, uint8_t hlen, const uint8_t *body, uint8_t blen) 00013 { 00014 return pn532.tgSetData(header, hlen, body, blen); 00015 } 00016 00017 int16_t MACLink::read(uint8_t *buf, uint8_t len) 00018 { 00019 return pn532.tgGetData(buf, len); 00020 }
Generated on Tue Jul 12 2022 21:59:39 by 1.7.2