blob: 0d3896e6bfaf4479cceab5b7e6386ad48af5d624 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#define ESP_WIFI_SSID "BELL83"
#define ESP_WIFI_PASS "83castleton@"
#define ESP_MAXIMUM_RETRY 100
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
static const char *WIFI_TAG = "WIFI";
EventGroupHandle_t s_wifi_event_group;
static int s_retry_num = 0;
void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data);
void wifi_init_sta(void);
|