Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of PN532 by
Diff: MifareClassic.h
- Revision:
- 3:4189a10038e6
- Child:
- 7:a26fa6ef10eb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MifareClassic.h Thu Nov 21 04:30:49 2013 +0000
@@ -0,0 +1,22 @@
+#ifndef MifareClassic_h
+#define MifareClassic_h
+
+#include <PN532.h>
+#include <Ndef.h>
+#include <NfcTag.h>
+
+class MifareClassic
+{
+ public:
+ MifareClassic(PN532& nfcShield);
+ ~MifareClassic();
+ NfcTag read(uint8_t *uid, unsigned int uidLength);
+ bool write(NdefMessage& ndefMessage, uint8_t *uid, unsigned int uidLength);
+ private:
+ PN532* _nfcShield;
+ int getBufferSize(int messageLength);
+ int getNdefStartIndex(uint8_t *data);
+ bool decodeTlv(uint8_t *data, int &messageLength, int &messageStartIndex);
+};
+
+#endif
