#pragma once #ifdef __cplusplus extern "C" { #endif #include "driver/spi_master.h" #define RC522_DEFAULT_MISO (25) #define RC522_DEFAULT_MOSI (23) #define RC522_DEFAULT_SCK (19) #define RC522_DEFAULT_SDA (22) #define RC522_DEFAULT_SPI_HOST (VSPI_HOST) #define RC522_DEFAULT_SCAN_INTERVAL_MS (125) #define RC522_DEFAULT_TACK_STACK_SIZE (4 * 1024) #define RC522_DEFAULT_TACK_STACK_PRIORITY (4) typedef void(*rc522_tag_callback_t)(uint8_t*); /* Called when a tag is detected (url != NULL) or removed (sn == NULL, url == NULL). * url is the NDEF URI record content, or NULL if no NDEF was found on the tag. * The caller must NOT free sn or url — they are freed by the library. */ typedef void(*rc522_ndef_callback_t)(uint8_t* sn, const char* url); typedef struct { int miso_io; /*