2025-04-19 09:30:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @file FluxWifi.h
|
|
|
|
|
|
* @brief Wifi头文件
|
|
|
|
|
|
*
|
|
|
|
|
|
* 用于Wifi初始化等功能
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author wang xiang en
|
|
|
|
|
|
* @date 2025-04-19
|
|
|
|
|
|
* @version 版本号
|
|
|
|
|
|
* @copyright 版权声明((C)2025, YUWELL MEDTECH Co.ltd)
|
|
|
|
|
|
*/
|
2025-03-15 09:37:07 +08:00
|
|
|
|
#ifndef _FLUX_WIFI_H
|
|
|
|
|
|
#define _FLUX_WIFI_H
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
2025-03-10 18:07:34 +08:00
|
|
|
|
#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"
|
|
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/* WiFi扫描列表大小 */
|
2025-03-10 18:07:34 +08:00
|
|
|
|
#define DEFAULT_SCAN_LIST_SIZE 10
|
|
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/* 选择是否使用Wifi功能*/
|
|
|
|
|
|
#define CONFIG_WIFI_SCAN_ENABLE (0)
|
2025-03-10 18:07:34 +08:00
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/* 热点信息 */
|
2025-03-11 14:36:08 +08:00
|
|
|
|
extern wifi_ap_record_t ap_info[DEFAULT_SCAN_LIST_SIZE];
|
2025-03-12 14:00:26 +08:00
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/* 热点数量及 热点信息 */
|
2025-03-11 14:36:08 +08:00
|
|
|
|
extern int number;
|
|
|
|
|
|
extern int ap_count;
|
|
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @brief wifi扫描函数
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
2025-03-10 18:07:34 +08:00
|
|
|
|
void wifi_scan(void);
|
2025-03-12 14:00:26 +08:00
|
|
|
|
|
2025-04-19 09:30:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @brief 初始化WiFi扫描需要的环境
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
void wifi_scanInit(void);
|
2025-03-15 09:37:07 +08:00
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
} /*extern "C"*/
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|