PN532 driver for ESP-IDF which works through HSU
Your Name 55dcf75598 typo fix | 2 years ago | |
---|---|---|
components | 2 years ago | |
main | 2 years ago | |
CMakeLists.txt | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago |
It is a simple driver for esp-idf with PN532
support which works through HSU.
It has nothing except initialization and passive ID
reads.
Anyways:
It is simple, you should specify uart port and pins using menuconfig
.
The device must be initialized using
int pn532_init()
Then it could be possible to read values like this:
while (1) {
if ((len = pn532_read(buf, 64)) != ESP_FAIL) {
len = pn532_decode_card(buf, len, card);
printf("Card Detected: ");
printbuf(card, len);
puts("");
vTaskDelay(500 / portTICK_PERIOD_MS);
}
vTaskDelay(100 / portTICK_PERIOD_MS);
}
The pn532_decode_card()
is an improvisation which is intended to cut id values
using packet provided length. There's no magic.
See main.c for a complete example.
GPLv2