NFC library using PN532 to read/write NDEF Messages to NFC tags
Dependents: Seeed_NFC_Shield_write Nucleo_test_nfc
Fork of PN532 by
Diff: MifareUltralight.h
- Revision:
- 3:4189a10038e6
diff -r f618fb2169c4 -r 4189a10038e6 MifareUltralight.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MifareUltralight.h Thu Nov 21 04:30:49 2013 +0000 @@ -0,0 +1,26 @@ +#ifndef MifareUltralight_h +#define MifareUltralight_h + +#include <PN532.h> +#include <NfcTag.h> +#include <Ndef.h> + +class MifareUltralight +{ + public: + MifareUltralight(PN532& nfcShield); + ~MifareUltralight(); + NfcTag read(uint8_t *uid, unsigned int uidLength); + private: + PN532* nfc; + unsigned int tagCapacity; + unsigned int messageLength; + unsigned int bufferSize; + unsigned int ndefStartIndex; + bool isUnformatted(); + void readCapabilityContainer(); + void findNdefMessage(); + void calculateBufferSize(); +}; + +#endif