first commit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @file nfc_manager.h
|
||||
* @brief NFC Manager for ROM selection via NFC tags
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NFC_MAX_ROM_NAME 64
|
||||
|
||||
/**
|
||||
* @brief NFC ROM mapping structure
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t tag_uid[7]; // NFC tag UID
|
||||
char rom_path[NFC_MAX_ROM_NAME]; // ROM file path on SD card
|
||||
} nfc_rom_mapping_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize NFC manager
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t nfc_manager_init(void);
|
||||
|
||||
/**
|
||||
* @brief Check if NFC tag is present
|
||||
* @return true if tag detected
|
||||
*/
|
||||
bool nfc_manager_tag_present(void);
|
||||
|
||||
/**
|
||||
* @brief Read NFC tag and get ROM path
|
||||
* @param rom_path Output buffer for ROM path
|
||||
* @param max_len Maximum length of rom_path buffer
|
||||
* @return ESP_OK if ROM mapping found
|
||||
*/
|
||||
esp_err_t nfc_manager_get_rom(char *rom_path, size_t max_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user