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
MACLink Class Reference
#include <mac_link.h>
Public Member Functions | |
| int8_t | activateAsTarget (uint16_t timeout=0) |
| Activate PN532 as a target. | |
| bool | write (const uint8_t *header, uint8_t hlen, const uint8_t *body=0, uint8_t blen=0) |
| write a PDU packet, the packet should be less than (255 - 2) bytes | |
| int16_t | read (uint8_t *buf, uint8_t len) |
| read a PDU packet, the packet will be less than (255 - 2) bytes | |
Detailed Description
The MACLink class.
Definition at line 11 of file mac_link.h.
Member Function Documentation
| int8_t activateAsTarget | ( | uint16_t | timeout = 0 ) |
Activate PN532 as a target.
- Parameters:
-
timeout max time to wait, 0 means no timeout
- Returns:
- > 0 success = 0 timeout < 0 failed
Definition at line 5 of file mac_link.cpp.
| int16_t read | ( | uint8_t * | buf, |
| uint8_t | len | ||
| ) |
read a PDU packet, the packet will be less than (255 - 2) bytes
- Parameters:
-
buf the buffer to contain the PDU packet len lenght of the buffer
- Returns:
- >=0 length of the PDU packet <0 failed
Definition at line 17 of file mac_link.cpp.
| bool write | ( | const uint8_t * | header, |
| uint8_t | hlen, | ||
| const uint8_t * | body = 0, |
||
| uint8_t | blen = 0 |
||
| ) |
write a PDU packet, the packet should be less than (255 - 2) bytes
- Parameters:
-
header packet header hlen length of header body packet body blen length of body
- Returns:
- true success false failed
Definition at line 12 of file mac_link.cpp.
Generated on Tue Jul 12 2022 16:40:03 by
1.7.2
