diff --git a/include/main.h b/include/main.h index 5f42a05..d4f546d 100644 --- a/include/main.h +++ b/include/main.h @@ -8,7 +8,7 @@ #define PUMP_COUNT (4) static QueueHandle_t gpio_evt_queue = NULL; -nvs_handle_t config_handle; +extern nvs_handle_t config_handle; extern uint8_t mac[6]; diff --git a/main/main.c b/main/main.c index fc1bfce..2c71611 100644 --- a/main/main.c +++ b/main/main.c @@ -19,6 +19,7 @@ static const char *TAG = "BARBACK"; uint8_t mac[6]; +nvs_handle_t config_handle = {}; void app_main(void) { esp_err_t err = nvs_flash_init(); @@ -33,7 +34,7 @@ void app_main(void) { if (err != ESP_OK) { printf("Error (%s) opening NVS handle!\n", esp_err_to_name(err)); } else { - ESP_LOGI(TAG, "config_handle: %d", config_handle); + ESP_LOGI(TAG, "config_handle: %d", (int)config_handle); } esp_efuse_mac_get_default((uint8_t*)&mac);