纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。 Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
403 B
C++
29 lines
403 B
C++
#include "micro_decoder/decoder_source.h"
|
|
#include "micro_decoder/types.h"
|
|
#include <stdio.h>
|
|
|
|
static FILE* g_fp = nullptr;
|
|
/*
|
|
extern "C" {
|
|
|
|
void md_init(const char* path)
|
|
{
|
|
g_fp = fopen(path, "rb");
|
|
}
|
|
|
|
int md_read(uint8_t* buf, int len)
|
|
{
|
|
if (!g_fp) return 0;
|
|
return fread(buf, 1, len, g_fp);
|
|
}
|
|
|
|
void md_deinit()
|
|
{
|
|
if (g_fp) {
|
|
fclose(g_fp);
|
|
g_fp = nullptr;
|
|
}
|
|
}
|
|
|
|
}
|
|
*/ |