1. 完成了PWR按键相关的测试,测试通过
2. 完成了语言识别测试,测试基本通过,后续需要修改从sd卡导入模型以配合ota
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Created by misaki on 2025/8/28.
|
||||
//
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <stdio.h>
|
||||
#include <esp_heap_caps.h>
|
||||
|
||||
void print_sys_memory(void)
|
||||
{
|
||||
size_t internal = heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
|
||||
size_t spiram = heap_caps_get_free_size(MALLOC_CAP_SPIRAM);
|
||||
printf("Internal(内部): %zu kB, SPIRAM(外部): %zu kB\n", internal/1024, spiram/1024);
|
||||
}
|
||||
|
||||
void print_sys_memory_task(void* pvParameters)
|
||||
{
|
||||
while(1) {
|
||||
print_sys_memory();
|
||||
vTaskDelay(pdMS_TO_TICKS(1000)); // 每1秒打印一次
|
||||
}
|
||||
}
|
||||
|
||||
void create_print_sys_memory_task() {
|
||||
xTaskCreatePinnedToCore(print_sys_memory_task, "print_sys_memory", 1024, NULL, 2, NULL, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user