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: mac_link.h
- Revision:
- 5:418ee8924317
- Parent:
- 3:4189a10038e6
--- a/mac_link.h Thu Nov 21 04:41:47 2013 +0000
+++ b/mac_link.h Tue Mar 25 16:00:44 2014 +0000
@@ -5,6 +5,9 @@
#include "PN532.h"
+/**
+ * The MACLink class
+ */
class MACLink {
public:
MACLink(PN532Interface &interface) : pn532(interface) {
@@ -12,32 +15,32 @@
};
/**
- * @brief Activate PN532 as a target
- * @param timeout max time to wait, 0 means no timeout
- * @return > 0 success
- * = 0 timeout
- * < 0 failed
- */
+ * @brief Activate PN532 as a target
+ * @param timeout max time to wait, 0 means no timeout
+ * @return > 0 success
+ * = 0 timeout
+ * < 0 failed
+ */
int8_t activateAsTarget(uint16_t timeout = 0);
/**
- * @brief write a PDU packet, the packet should be less than (255 - 2) bytes
- * @param header packet header
- * @param hlen length of header
- * @param body packet body
- * @param blen length of body
- * @return true success
- * false failed
- */
+ * @brief write a PDU packet, the packet should be less than (255 - 2) bytes
+ * @param header packet header
+ * @param hlen length of header
+ * @param body packet body
+ * @param blen length of body
+ * @return true success
+ * false failed
+ */
bool write(const uint8_t *header, uint8_t hlen, const uint8_t *body = 0, uint8_t blen = 0);
/**
- * @brief read a PDU packet, the packet will be less than (255 - 2) bytes
- * @param buf the buffer to contain the PDU packet
- * @param len lenght of the buffer
- * @return >=0 length of the PDU packet
- * <0 failed
- */
+ * @brief read a PDU packet, the packet will be less than (255 - 2) bytes
+ * @param buf the buffer to contain the PDU packet
+ * @param len lenght of the buffer
+ * @return >=0 length of the PDU packet
+ * <0 failed
+ */
int16_t read(uint8_t *buf, uint8_t len);
uint8_t *getHeaderBuffer(uint8_t *len) {
