Skip to content

Commit c25234d

Browse files
committed
Better MIP description
1 parent 03284ba commit c25234d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ robust, and easy. Features include:
2020
- Tiny static and run-time footprint
2121
- Source code is both ISO C and ISO C++ compliant
2222
- Works with any network stack with socket API, like LwIP or FreeRTOS-Plus-TCP
23-
- Optional [built-in IP stack](mip) for bare metal or RTOS-enabled applications
2423
- Very easy to integrate: just copy `mongoose.c` and `mongoose.h` files to your build tree
24+
- Optional built-in TCP/IP stack with drivers for bare metal or RTOS firmwares
25+
- A full device dashboard
26+
[bare metal example on Nucleo-F429ZI](examples/stm32/nucleo-f429zi-baremetal)
27+
is only 6 files
28+
- For comparison, a CubeIDE generated HTTP example is 400+ files
2529
- Detailed [documentation](https://mongoose.ws/documentation/) and
2630
[tutorials](https://mongoose.ws/tutorials/)
2731

examples/device-dashboard/net.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
170170
// u ? u->name : "NULL"));
171171
if (mg_http_match_uri(hm, "/api/hi")) {
172172
mg_http_reply(c, 200, "", "hi\n"); // Testing endpoint
173+
} else if (mg_http_match_uri(hm, "/api/debug")) {
174+
int level = mg_json_get_long(hm->body, "$.level", MG_LL_DEBUG);
175+
mg_log_set(level);
176+
mg_http_reply(c, 200, "", "Debug level set to %d\n", level);
173177
} else if (u == NULL && mg_http_match_uri(hm, "/api/#")) {
174178
// All URIs starting with /api/ must be authenticated
175179
mg_http_reply(c, 403, "", "Denied\n");

0 commit comments

Comments
 (0)