Generic library for working with PN532-like chips
Fork of PN532 by
Diff: PN532Interface.h
- Revision:
- 6:418ee8924317
- Parent:
- 3:4189a10038e6
--- a/PN532Interface.h Thu Nov 21 04:41:47 2013 +0000 +++ b/PN532Interface.h Tue Mar 25 16:00:44 2014 +0000 @@ -24,6 +24,9 @@ b = (b & 0xCC) >> 2 | (b & 0x33) << 2; \ b = (b & 0xAA) >> 1 | (b & 0x55) << 1 +/** + * The PN532Interface class + */ class PN532Interface { public: @@ -31,24 +34,24 @@ virtual void wakeup() = 0; /** - * @brief write a command and check ack - * @param header packet header - * @param hlen length of header - * @param body packet body - * @param blen length of body - * @return 0 success - * not 0 failed - */ + * @brief write a command and check ack + * @param header packet header + * @param hlen length of header + * @param body packet body + * @param blen length of body + * @return 0 success + * not 0 failed + */ virtual int8_t writeCommand(const uint8_t *header, uint8_t hlen, const uint8_t *body = 0, uint8_t blen = 0) = 0; /** - * @brief read the response of a command, strip prefix and suffix - * @param buf to contain the response data - * @param len lenght to read - * @param timeout max time to wait, 0 means no timeout - * @return >=0 length of response without prefix and suffix - * <0 failed to read response - */ + * @brief read the response of a command, strip prefix and suffix + * @param buf to contain the response data + * @param len lenght to read + * @param timeout max time to wait, 0 means no timeout + * @return >=0 length of response without prefix and suffix + * <0 failed to read response + */ virtual int16_t readResponse(uint8_t buf[], uint8_t len, uint16_t timeout = 1000) = 0; };