```
feat(bluetooth): 添加多按钮支持和WiFi连接音频反馈 添加MultiButton库支持多按键功能,重构SPI显示屏驱动代码, 迁移MP3音频文件至正确目录并集成WiFi连接状态音频提示音。 - 添加Multi_Button.c源文件和相关头文件包含 - 重构spi_st7735s.c中的数组初始化格式,优化代码可读性 - 将MP3音频文件从Development_Docs/MP3迁移到Core/Bsp/BSP_Device/bsp_mp3/MP3 - 在WiFi连接过程中添加MP3音频反馈(连接成功/失败提示音) - 优化ST7735显示屏驱动中的DMA传输模式支持 ```
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "cmsis_os.h"
|
||||
#include "cmsis_os2.h"
|
||||
#include "elog.h"
|
||||
#include "mp3_driver.h" // 添加MP3模块头文件
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -201,16 +202,19 @@ uint8_t WIFI_Connect_WiFi(const char *ssid, const char *password,
|
||||
elog_i(TAG, "等待WiFi基础连接响应...");
|
||||
if (!WIFI_WaitEvent("OK", "ERROR", 3000)) {
|
||||
elog_e(TAG, "WiFi基础连接失败");
|
||||
MP3_Play(WIFI_CONNECT_FAIL); // WiFi连接失败,播放提示音
|
||||
return 0;
|
||||
}
|
||||
|
||||
elog_i(TAG, "等待WiFi详细连接结果...");
|
||||
if (!WIFI_WaitEvent("+CWJAP:1", "+CWJAP:0", timeout_ms)) {
|
||||
elog_e(TAG, "WiFi详细连接失败");
|
||||
MP3_Play(WIFI_CONNECT_FAIL); // WiFi连接失败,播放提示音
|
||||
return 0;
|
||||
}
|
||||
|
||||
elog_i(TAG, "WiFi连接成功");
|
||||
MP3_Play(WIFI_CONNECT_OK); // WiFi连接成功,播放提示音
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user