diff --git a/src/httpserver/rest_interface.c b/src/httpserver/rest_interface.c index 6dc84d99d..cfc62d520 100644 --- a/src/httpserver/rest_interface.c +++ b/src/httpserver/rest_interface.c @@ -8,7 +8,9 @@ #include "../jsmn/jsmn_h.h" #include "../ota/ota.h" #include "../printnetinfo/printnetinfo.h" +#ifdef BK_LITTLEFS #include "../littlefs/our_lfs.h" +#endif #include "lwip/sockets.h" @@ -287,15 +289,17 @@ static int http_rest_get(http_request_t *request){ return http_rest_get_seriallog(request); } +#ifdef BK_LITTLEFS if (!strcmp(request->url, "api/fsblock")){ return http_rest_get_flash(request, LFS_BLOCKS_START, LFS_BLOCKS_LEN); } +#endif - #ifdef BK_LITTLEFS +#ifdef BK_LITTLEFS if (!strncmp(request->url, "api/lfs/", 8)){ return http_rest_get_lfs_file(request); } - #endif +#endif http_setup(request, httpMimeTypeHTML); poststr(request, "GET of "); @@ -478,15 +482,17 @@ static int http_rest_post(http_request_t *request){ if (!strcmp(request->url, "api/ota")){ return http_rest_post_flash(request, 0x132000); } +#ifdef BK_LITTLEFS if (!strcmp(request->url, "api/fsblock")){ return http_rest_post_flash(request, LFS_BLOCKS_START); } +#endif - #ifdef BK_LITTLEFS +#ifdef BK_LITTLEFS if (!strncmp(request->url, "api/lfs/", 8)){ return http_rest_post_lfs_file(request); } - #endif +#endif http_setup(request, httpMimeTypeHTML); poststr(request, "POST to "); diff --git a/src/obk_config.h b/src/obk_config.h index 481c209bb..1616e7fae 100644 --- a/src/obk_config.h +++ b/src/obk_config.h @@ -4,6 +4,11 @@ #ifndef OBK_CONFIG_H #define OBK_CONFIG_H +#if PLATFORM_XR809 + + +#else + // comment out to remove component // comment out to remove littlefs @@ -11,5 +16,7 @@ // add further app wide defined here, and used them to control build inclusion. +#endif + #endif \ No newline at end of file