new buzzer component
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include "nvs.h"
|
||||
#include "mdns.h"
|
||||
|
||||
#include "wifi.h"
|
||||
#include "network_events.h"
|
||||
#include "network.h"
|
||||
|
||||
|
||||
#define AP_SSID "plx-%02x%02x%02x"
|
||||
|
||||
@@ -292,6 +294,8 @@ void wifi_ap_start(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Starting AP");
|
||||
|
||||
esp_event_post(NETWORK_EVENTS, NETWORK_EVENT_AP_STARTED, NULL, 0, portMAX_DELAY);
|
||||
|
||||
xEventGroupClearBits(wifi_event_group, WIFI_STA_MODE_BIT);
|
||||
esp_wifi_stop();
|
||||
|
||||
@@ -304,6 +308,9 @@ void wifi_ap_start(void)
|
||||
void wifi_ap_stop(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Stopping AP");
|
||||
|
||||
esp_event_post(NETWORK_EVENTS, NETWORK_EVENT_AP_STOP, NULL, 0, portMAX_DELAY);
|
||||
|
||||
xEventGroupClearBits(wifi_event_group, WIFI_AP_MODE_BIT);
|
||||
esp_wifi_stop();
|
||||
|
||||
4
components/network/src/network_events.c
Normal file
4
components/network/src/network_events.c
Normal file
@@ -0,0 +1,4 @@
|
||||
#include "network_events.h"
|
||||
|
||||
// Define o base de eventos
|
||||
ESP_EVENT_DEFINE_BASE(NETWORK_EVENTS);
|
||||
Reference in New Issue
Block a user