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;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
*/
|