refactor + documentation

This commit is contained in:
2026-09-17 19:49:23 +02:00
parent a1dae20cbf
commit a89fc4b4b8
3 changed files with 21 additions and 10 deletions
+4 -4
View File
@@ -15,7 +15,7 @@
static const char *TAG = "YGG_WIFI";
static EventGroupHandle_t s_wifi_event_group;
void wifi_event_handler(void* arg, esp_event_base_t event_base,
void ygg_wifi_event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
static int s_retry_num = 0;
@@ -38,7 +38,7 @@ void wifi_event_handler(void* arg, esp_event_base_t event_base,
}
}
void wifi_init_sta(void)
void ygg_wifi_init_sta(void)
{
s_wifi_event_group = xEventGroupCreate();
@@ -53,12 +53,12 @@ void wifi_init_sta(void)
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,
ESP_EVENT_ANY_ID,
&wifi_event_handler,
&ygg_wifi_event_handler,
NULL,
&instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,
IP_EVENT_STA_GOT_IP,
&wifi_event_handler,
&ygg_wifi_event_handler,
NULL,
&instance_got_ip));