mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-16 19:20:30 +00:00
Refactor device-dashboard
This commit is contained in:
1 parent
49a9bb5a8b
commit
58606e1702
29 files changed
+5123
-4476
No files matched your search
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "hal.h"
|
||||
#include "mongoose.h"
|
||||
#include "net.h"
|
||||
|
||||
#define LED1 PIN('N', 1) // On-board LED pin
|
||||
#define LED2 PIN('N', 0) // On-board LED pin
|
||||
@@ -89,8 +90,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
MG_INFO(("Initialising application..."));
|
||||
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);
|
||||
mg_http_listen(&mgr, "http://0.0.0.0", device_dashboard_fn, NULL);
|
||||
web_init(&mgr);
|
||||
|
||||
MG_INFO(("Starting event loop"));
|
||||
for (;;) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "hal.h"
|
||||
#include "mongoose.h"
|
||||
#include "net.h"
|
||||
|
||||
#define LED1 PIN('N', 1) // On-board LED pin
|
||||
#define LED2 PIN('N', 0) // On-board LED pin
|
||||
@@ -74,8 +75,7 @@ static void server(void *args) {
|
||||
}
|
||||
|
||||
MG_INFO(("Initialising application..."));
|
||||
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);
|
||||
mg_http_listen(&mgr, "http://0.0.0.0", device_dashboard_fn, NULL);
|
||||
web_init(&mgr);
|
||||
|
||||
MG_INFO(("Starting event loop"));
|
||||
for (;;) mg_mgr_poll(&mgr, 1); // Infinite event loop
|
||||
|
||||
Reference in new issue
Block a user