5d79f88918
2. 进一步修改了语音识别,关闭了关键词唤醒功能,只保留了指令识别功能 3. 构建了业务层的基本框架(增加了底层驱动对于的C++兼容),业务代码采用C++编写,启用了RTTI(运行时类型识别)
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "esp_log.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "esp_wifi.h"
|
|
#include "nvs_flash.h"
|
|
#include "esp_log.h"
|
|
#include <stdio.h>
|
|
#include <string.h> // For memcpy
|
|
#include "esp_system.h"
|
|
#include "esp_bt.h"
|
|
#include "esp_gap_ble_api.h"
|
|
#include "esp_bt_main.h"
|
|
|
|
// WiFi AP信息结构体
|
|
typedef struct {
|
|
char ssid[33]; // SSID名称 (最大32字符 + 1个空字符)
|
|
uint8_t bssid[6]; // MAC地址
|
|
int8_t rssi; // 信号强度
|
|
wifi_auth_mode_t authmode; // 认证模式
|
|
} wifi_ap_info_t;
|
|
|
|
// BLE设备信息结构体
|
|
typedef struct {
|
|
char name[100]; // 设备名称
|
|
uint8_t address[6]; // MAC地址
|
|
int8_t rssi; // 信号强度
|
|
} ble_device_info_t;
|
|
|
|
extern uint16_t BLE_NUM;
|
|
extern uint16_t WIFI_NUM;
|
|
extern bool Scan_finish;
|
|
|
|
void Wireless_Init(void);
|
|
void WIFI_Init(void *arg);
|
|
uint16_t WIFI_Scan(void);
|
|
void BLE_Init(void *arg);
|
|
uint16_t BLE_Scan(void);
|
|
|
|
// 新增接口函数
|
|
uint16_t wireless_get_wifi_ap_list(wifi_ap_info_t *ap_list, uint16_t max_aps);
|
|
uint16_t wireless_get_ble_device_list(ble_device_info_t *device_list, uint16_t max_devices);
|
|
void wireless_print_wifi_aps(void);
|
|
void wireless_print_ble_devices(void);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |