Move mip into mip/

This commit is contained in:
Sergey Lyubka committed 2022-06-11 17:29:45 +01:00
1 parent 903b510411
commit d3368e4aad
13 files changed
+1016 -858

No files matched your search

+18 -16
View File
@@ -1290,6 +1290,23 @@ size_t mg_dns_parse_rr(const uint8_t *buf, size_t len, size_t ofs,
#ifndef MG_JSON_MAX_DEPTH
#define MG_JSON_MAX_DEPTH 30
#endif
// Error return values - negative. Successful returns are >= 0
enum { MG_JSON_TOO_DEEP = -1, MG_JSON_INVALID = -2, MG_JSON_NOT_FOUND = -3 };
int mg_json_get(const char *buf, int len, const char *path, int *toklen);
bool mg_json_get_num(struct mg_str json, const char *path, double *v);
bool mg_json_get_bool(struct mg_str json, const char *path, bool *v);
char *mg_json_get_str(struct mg_str json, const char *path);
char *mg_json_get_hex(struct mg_str json, const char *path);
struct mip_driver {
void *data; // Driver-specific data
void (*init)(void *data); // Initialise driver
@@ -1307,22 +1324,7 @@ struct mip_ipcfg {
void mip_init(struct mg_mgr *, struct mip_ipcfg *, struct mip_driver *);
#ifndef MG_JSON_MAX_DEPTH
#define MG_JSON_MAX_DEPTH 30
#endif
// Error return values - negative. Successful returns are >= 0
enum { MG_JSON_TOO_DEEP = -1, MG_JSON_INVALID = -2, MG_JSON_NOT_FOUND = -3 };
int mg_json_get(const char *buf, int len, const char *path, int *toklen);
bool mg_json_get_num(struct mg_str json, const char *path, double *v);
bool mg_json_get_bool(struct mg_str json, const char *path, bool *v);
char *mg_json_get_str(struct mg_str json, const char *path);
char *mg_json_get_hex(struct mg_str json, const char *path);
extern struct mip_driver mip_driver_stm32;
#ifdef __cplusplus
}