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.
Dependencies: Chainable_RGB_LED mbed
Diff: nfc/mac_link.cpp
- Revision:
- 0:88960f3eeb2c
diff -r 000000000000 -r 88960f3eeb2c nfc/mac_link.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nfc/mac_link.cpp Fri Dec 27 01:46:32 2013 +0000
@@ -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);
+}