mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-04-09 03:11:29 +00:00
feat(logger): add logging macros for consistent logging across components
This commit is contained in:
parent
9a11453fbc
commit
a2d51540b7
7 changed files with 77 additions and 33 deletions
|
|
@ -1,14 +1,15 @@
|
|||
#define LOG_TAG "WIFI"
|
||||
|
||||
#include "wifi.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_netif.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "logger.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
static const char *TAG = "WIFI";
|
||||
static bool s_wifi_started = false;
|
||||
|
||||
esp_err_t wifi_start_ap(const char *ssid, const char *password, uint8_t channel,
|
||||
|
|
@ -69,7 +70,7 @@ esp_err_t wifi_start_ap(const char *ssid, const char *password, uint8_t channel,
|
|||
ESP_ERROR_CHECK(esp_wifi_start());
|
||||
|
||||
s_wifi_started = true;
|
||||
ESP_LOGI(TAG, "WiFi AP started: SSID=%s channel=%u", ssid, channel);
|
||||
LOGI("WiFi AP started: SSID=%s channel=%u", ssid, channel);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
|
@ -81,5 +82,5 @@ void wifi_stop_ap(void) {
|
|||
esp_wifi_stop();
|
||||
esp_wifi_deinit();
|
||||
s_wifi_started = false;
|
||||
ESP_LOGI(TAG, "WiFi AP stopped");
|
||||
LOGI("WiFi AP stopped");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue