#include "esp_log.h" #include "esp_ota_ops.h" #include "board_rgb_off.h" #include "nfc_engine/nfc_engine.h" #include "nfc_engine/session_capture.h" #include "net_service/app_net.h" static const char *TAG = "main"; void app_main(void) { (void)esp_ota_mark_app_valid_cancel_rollback(); board_rgb_led_quiet(); ESP_LOGI(TAG, "PN532 NFC Toolkit starting"); nfc_engine_try_init(); /* non-fatal: logs warning if PN532 absent, AP starts regardless */ session_capture_init(); ESP_ERROR_CHECK(app_net_init()); if (nfc_engine_is_ready()) { ESP_LOGI(TAG, "PN532 ready · AP SSID PN532-Toolkit → http://192.168.4.1"); } else { ESP_LOGW(TAG, "PN532 not found at boot — AP running, retrying · http://192.168.4.1"); } }