mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 12:06:58 +03:00
Centralizing the defines (#1624)
* defines changes * Finish #define move + #define STBI_ONLY_JPEGsave 2% of Flash * remove the defines on the old places * ClassFlowCNNGeneral in define.h * revert to origin * fix translation not ready
This commit is contained in:
@@ -23,6 +23,7 @@ extern "C" {
|
||||
|
||||
#include <string.h>
|
||||
#include <esp_log.h>
|
||||
#include "../../include/defines.h"
|
||||
|
||||
|
||||
#include "ClassLogFile.h"
|
||||
@@ -31,9 +32,6 @@ extern "C" {
|
||||
|
||||
static const char* TAG = "HELPER";
|
||||
|
||||
//#define ISWINDOWS_TRUE
|
||||
#define PATH_MAX_STRING_SIZE 256
|
||||
|
||||
using namespace std;
|
||||
|
||||
unsigned int systemStatus = 0;
|
||||
@@ -426,14 +424,14 @@ string getFileType(string filename)
|
||||
|
||||
/* recursive mkdir */
|
||||
int mkdir_r(const char *dir, const mode_t mode) {
|
||||
char tmp[PATH_MAX_STRING_SIZE];
|
||||
char tmp[FILE_PATH_MAX];
|
||||
char *p = NULL;
|
||||
struct stat sb;
|
||||
size_t len;
|
||||
|
||||
/* copy path */
|
||||
len = strnlen (dir, PATH_MAX_STRING_SIZE);
|
||||
if (len == 0 || len == PATH_MAX_STRING_SIZE) {
|
||||
len = strnlen (dir, FILE_PATH_MAX);
|
||||
if (len == 0 || len == FILE_PATH_MAX) {
|
||||
return -1;
|
||||
}
|
||||
memcpy (tmp, dir, len);
|
||||
|
||||
Reference in New Issue
Block a user