chore: migrate project into clean repository

This commit is contained in:
yuuux
2026-08-13 16:50:52 +08:00
commit d1d25a09e7
27405 changed files with 9422808 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/**
* Copyright (c) 2025, LISTENAI
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "mock_sysheap.h"
#include <stdlib.h>
DEFINE_FAKE_VALUE_FUNC(void *, exram_malloc, int, size_t);
DEFINE_FAKE_VOID_FUNC(exram_free, void *);
static void *mock_exram_malloc(int heap_id, size_t size)
{
return malloc(size);
}
static void mock_exram_free(void *ptr)
{
free(ptr);
}
void mock_sysheap_init(void)
{
RESET_FAKE(exram_malloc);
RESET_FAKE(exram_free);
exram_malloc_fake.custom_fake = mock_exram_malloc;
exram_free_fake.custom_fake = mock_exram_free;
}
void mock_sysheap_reset(void)
{
mock_sysheap_init();
}

View File

@@ -0,0 +1,25 @@
/**
* Copyright (c) 2025, LISTENAI
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "sysheap.h"
#include "fff.h"
#ifdef __cplusplus
extern "C" {
#endif
DECLARE_FAKE_VALUE_FUNC(void *, exram_malloc, int, size_t);
DECLARE_FAKE_VOID_FUNC(exram_free, void *);
void mock_sysheap_init(void);
void mock_sysheap_reset(void);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,22 @@
/**
* Copyright (c) 2025, LISTENAI
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void *exram_malloc(int heap_id, size_t size);
void exram_free(void *ptr);
#ifdef __cplusplus
}
#endif