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: llcp.h
- Revision:
- 6:418ee8924317
- Parent:
- 3:4189a10038e6
--- a/llcp.h Thu Nov 21 04:41:47 2013 +0000 +++ b/llcp.h Tue Mar 25 16:00:44 2014 +0000 @@ -8,6 +8,9 @@ #define LLCP_DEFAULT_DSAP 0x04 #define LLCP_DEFAULT_SSAP 0x20 +/** + * The LLCP class + */ class LLCP { public: LLCP(PN532Interface &interface) : link(interface) { @@ -17,12 +20,12 @@ }; /** - * @brief Actiave PN532 as a target - * @param timeout max time to wait, 0 means no timeout - * @return > 0 success - * = 0 timeout - * < 0 failed - */ + * @brief Actiave PN532 as a target + * @param timeout max time to wait, 0 means no timeout + * @return > 0 success + * = 0 timeout + * < 0 failed + */ int8_t activate(uint16_t timeout = 0); int8_t waitForConnection(uint16_t timeout = LLCP_DEFAULT_TIMEOUT); @@ -34,23 +37,23 @@ int8_t disconnect(uint16_t timeout = LLCP_DEFAULT_TIMEOUT); /** - * @brief write a 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 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 packet, the packet will be less than (255 - 2) bytes - * @param buf the buffer to contain the packet - * @param len lenght of the buffer - * @return >=0 length of the packet - * <0 failed - */ + * @brief read a packet, the packet will be less than (255 - 2) bytes + * @param buf the buffer to contain the packet + * @param len lenght of the buffer + * @return >=0 length of the packet + * <0 failed + */ int16_t read(uint8_t *buf, uint8_t len); uint8_t *getHeaderBuffer(uint8_t *len) {