fix some bugs for sd read

This commit is contained in:
wuzheng
2022-12-09 13:57:01 +08:00
parent 6fa996d132
commit 2df54e7f41
18 changed files with 2646 additions and 5 deletions
@@ -0,0 +1,4 @@
SRC_FILES := json_parser.c
include $(KERNEL_ROOT)/compiler.mk
@@ -1,6 +1,9 @@
#include "json_parser.h"
#include <fcntl.h>
// #include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <transform.h>
#include "cJSON.h"
@@ -31,9 +34,9 @@ yolov2_params_t param_parse(char *json_file_path)
} else {
printf("Reading config from: %s\n", json_file_path);
}
read(fin, buffer, sizeof(buffer));
close(fin);
// read json string
json_obj = cJSON_Parse(buffer);
// free(buffer);