mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-25 12:04:47 +00:00
Remove MG_ENABLE_STDIO and cleanup
This commit is contained in:
1 parent
d130c6f42d
commit
2a2c17a232
15 files changed
+59
-89
No files matched your search
@@ -6,7 +6,7 @@ DOCKER ?= docker run -it --rm -v $(PROJECT_ROOT_PATH):$(PROJECT_ROOT_PATH) -w $(
|
||||
FREERTOS_KERNEL_PATH ?= $(PROJECT_ROOT_PATH)/test/freertos-kernel
|
||||
FREERTOS_PLUS_TCP_PATH ?= $(PROJECT_ROOT_PATH)/test/freertos-tcp
|
||||
|
||||
MONGOOSE_FLAGS = -DMG_ARCH=MG_ARCH_FREERTOS_TCP -DMG_ENABLE_STDIO=1
|
||||
MONGOOSE_FLAGS = -DMG_ARCH=MG_ARCH_FREERTOS_TCP
|
||||
MCU_FLAGS = -mcpu=cortex-m7 -mthumb -mfloat-abi=softfp -mfpu=vfpv4
|
||||
#-mcpu=cortex-m7 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard
|
||||
|
||||
|
||||
@@ -10,12 +10,7 @@ static const char *s_listening_address = "http://0.0.0.0:80";
|
||||
// Event handler for the listening connection.
|
||||
static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
if (ev == MG_EV_HTTP_MSG) {
|
||||
#if MG_ENABLE_STDIO
|
||||
struct mg_http_serve_opts opts = {.root_dir = "/"};
|
||||
mg_http_serve_dir(c, ev_data, &opts);
|
||||
#else
|
||||
mg_http_reply(c, 200, "", "hello, %s!\n", "world");
|
||||
#endif
|
||||
}
|
||||
(void) fn_data;
|
||||
(void) ev_data;
|
||||
|
||||
Reference in new issue
Block a user