1. 完成了PWR按键相关的测试,测试通过

2. 完成了语言识别测试,测试基本通过,后续需要修改从sd卡导入模型以配合ota
This commit is contained in:
Misaki
2025-09-01 00:11:00 +08:00
parent f13bb5a230
commit ce0998c1c6
17 changed files with 980 additions and 60 deletions
+76 -1
View File
@@ -3,7 +3,7 @@
//
#include <esp_log.h>
#include "tools.h"
#include "I2C_Driver.h"
#include "QMI8658.h"
@@ -249,4 +249,79 @@ void lcd_touch_lvgl_test(void)
void gif_test(void)
{
gif_display_test();
}
#include "PWR_Key.h"
static void pwr_task(void *arg)
{
while (true) {
PWR_Loop(); // 电源键扫描
vTaskDelay(pdMS_TO_TICKS(100)); // 让出 CPU,防止 WDT
}
}
void pwr_key_test(void)
{
ESP_LOGI("PWR_KEY_TEST", "正在创建内存使用信息打印任务");
create_print_sys_memory_task();
PWR_Init(); // 电源键初始化
I2C_Init();
LCD_Init(); // 屏幕初始化
LVGL_Init();
/* 创建独立任务 */
xTaskCreate(pwr_task, "pwr_task", 2048, NULL, 5, NULL);
/* 主任务到这里就可以退出,进入 idle,WDT 不会再触发 */
ESP_LOGI("PWR_KEY_TEST", "pwr_key_test task created");
while (1) {
// raise the task priority of LVGL and/or reduce the handler period can improve the performance
vTaskDelay(pdMS_TO_TICKS(10));
// The task running lv_timer_handler should have lower priority than that running `lv_tick_inc`
lv_timer_handler();
}
}
#include "MIC_Speech.h"
void mic_speech_test(void)
{
I2C_Init();
LCD_Init(); // 屏幕初始化
SD_Init(); // 初始化 SD 卡以方便读出模型文件
LVGL_Init();
MIC_Speech_init();
while (1) {
print_sys_memory();
// raise the task priority of LVGL and/or reduce the handler period can improve the performance
vTaskDelay(pdMS_TO_TICKS(100));
// The task running lv_timer_handler should have lower priority than that running `lv_tick_inc`
lv_timer_handler();
}
}
void mic_speech_and_gif_and_music_test(void)
{
I2C_Init();
LCD_Init(); // 屏幕初始化
SD_Init(); // 初始化 SD 卡以方便读出模型文件
LVGL_Init();
gif_display_test_1();
MIC_Speech_init();
while (1) {
print_sys_memory();
// raise the task priority of LVGL and/or reduce the handler period can improve the performance
vTaskDelay(pdMS_TO_TICKS(100));
// The task running lv_timer_handler should have lower priority than that running `lv_tick_inc`
lv_timer_handler();
}
}