57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
#ifndef WIFI_TASK_H
|
|
#define WIFI_TASK_H
|
|
|
|
#include "stdio.h"
|
|
#include <string.h>
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "esp_log.h"
|
|
#include "esp_check.h"
|
|
#include "freertos/queue.h"
|
|
#include "esp_system.h"
|
|
#include "esp_wifi.h"
|
|
#include "esp_event.h"
|
|
#include "freertos/event_groups.h"
|
|
#include "esp_mac.h"
|
|
|
|
#include "nvs_flash.h"
|
|
#include "lwip/err.h"
|
|
#include "lwip/sockets.h"
|
|
#include "lwip/sys.h"
|
|
#include <lwip/netdb.h>
|
|
|
|
|
|
|
|
#include "sdkconfig.h"
|
|
#include "driver/uart.h"
|
|
|
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
|
|
typedef struct wifi_html_
|
|
{
|
|
char* html_name;
|
|
uint32_t html_addr;
|
|
uint32_t html_size;
|
|
uint8_t* html_data;
|
|
}wifi_html_t;
|
|
|
|
typedef struct wifi_Save_info_
|
|
{
|
|
char wifi_ssid[24];
|
|
char wifi_password[24];
|
|
uint8_t retry_count;
|
|
uint8_t wifi_mode;
|
|
}wifi_Save_info_t;
|
|
|
|
|
|
extern wifi_Save_info_t Sys_wifi_config;
|
|
|
|
extern wifi_html_t home_html;
|
|
extern wifi_html_t wifi_config_html;
|
|
extern wifi_html_t favicon_ico;
|
|
|
|
void wifi_init_station(void);
|
|
void wifi_init_softap(void);
|
|
esp_err_t start_web_server(void);
|
|
|
|
#endif |