- 在CMakeLists.txt中添加SU-03T语音模块依赖。 - 在main.cpp中实现SU-03T接收回调函数,处理接收消息。 - 完善各UI源文件文档,包括动作、屏幕和字体,明确模块作用与数据流向。 - 更新主应用逻辑,初始化并启动SU-03T接收器。 - 修改过程中确保兼容性,保留原有接口。
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* 文件: components/wifi-connect/include/wifi-connect.h
|
|
* 角色: Wi-Fi 连接、配网与网络状态管理
|
|
* 说明:
|
|
* - 本文件用于实现当前模块的核心功能或接口定义。
|
|
* - 修改前请先确认该模块与其它任务/外设之间的数据流关系。
|
|
* - 涉及协议与硬件时,优先保持现有接口兼容,避免联调回归。
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
WIFI_CONNECT_STATUS_IDLE = 0,
|
|
WIFI_CONNECT_STATUS_PROVISIONING,
|
|
WIFI_CONNECT_STATUS_CONNECTING,
|
|
WIFI_CONNECT_STATUS_CONNECTED,
|
|
WIFI_CONNECT_STATUS_FAILED,
|
|
WIFI_CONNECT_STATUS_TIMEOUT,
|
|
} wifi_connect_status_t;
|
|
|
|
typedef struct {
|
|
bool has_config;
|
|
char ssid[33];
|
|
char password[65];
|
|
} wifi_connect_config_t;
|
|
|
|
esp_err_t wifi_connect_init(void);
|
|
esp_err_t wifi_connect_start(void);
|
|
esp_err_t wifi_connect_stop(void);
|
|
wifi_connect_status_t wifi_connect_get_status(void);
|
|
esp_err_t wifi_connect_get_config(wifi_connect_config_t *config);
|
|
esp_err_t wifi_connect_clear_config(void);
|
|
const char* wifi_connect_get_ip(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|