Atmosphere/fusee/fusee-secondary/src/sd_utils.c

16 lines
348 B
C
Raw Normal View History

#include <stdio.h>
2018-04-07 15:43:54 -06:00
#include "sd_utils.h"
#include "hwinit.h"
#include "sdmmc.h"
size_t read_sd_file(void *dst, size_t dst_size, const char *filename) {
FILE *file = fopen(filename, "rb");
if (file == NULL) {
return 0;
} else {
size_t sz = fread(dst, 1, dst_size, file);
fclose(file);
return sz;
}
2018-05-05 00:11:22 +02:00
}