feat: integrate MCP and ES3C28P audio support with upstream compatibility updates

This commit is contained in:
Adolfo Reyna
2026-07-04 15:41:37 -04:00
parent b8bf59fedf
commit 300ddb3a7f
21 changed files with 1260 additions and 33 deletions
+18
View File
@@ -10,8 +10,19 @@
constexpr auto* TAG = "Tactility";
#include <cJSON.h>
#include <esp_heap_caps.h>
namespace tt {
static void* cjson_psram_malloc(size_t size) {
return heap_caps_malloc(size, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
}
static void cjson_psram_free(void* ptr) {
heap_caps_free(ptr);
}
static void initNetwork() {
LOG_I(TAG, "Init network");
ESP_ERROR_CHECK(esp_netif_init());
@@ -19,6 +30,13 @@ static void initNetwork() {
}
void initEsp() {
cJSON_Hooks hooks = {
.malloc_fn = cjson_psram_malloc,
.free_fn = cjson_psram_free
};
cJSON_InitHooks(&hooks);
LOG_I(TAG, "cJSON hooks initialized to use PSRAM");
check(initPartitionsEsp(), "Failed to init partitions");
initNetwork();
}