mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-26 20:38:25 +00:00
Add USB NCM drivers
This commit is contained in:
1 parent
bae9e53f00
commit
a8d6573ccc
31 files changed
+3057
-175
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "net_builtin.h"
|
||||
#include "bsd.h"
|
||||
#include "drivers/usb.h"
|
||||
#include "mdash.h"
|
||||
#include "ota.h"
|
||||
#include "printf.h"
|
||||
@@ -2290,6 +2291,7 @@ void mg_tcpip_qwrite(void *buf, size_t len, struct mg_tcpip_if *ifp) {
|
||||
}
|
||||
|
||||
void mg_tcpip_init(struct mg_mgr *mgr, struct mg_tcpip_if *ifp) {
|
||||
mg_usb_init(); // Early, so that the log reaches the USB serial port
|
||||
// If L2 address is not set, make a random one; fill MTU
|
||||
mg_l2_init(ifp);
|
||||
ifp->mtu = ifp->l2mtu;
|
||||
@@ -2456,6 +2458,7 @@ void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
|
||||
mg_timer_poll(&mgr->timers, now);
|
||||
mg_ota_poll(mgr);
|
||||
mg_mdash_poll(mgr);
|
||||
mg_usb_poll(); // Also without a TCP/IP interface: USB serial only
|
||||
if (mgr->ifp == NULL || mgr->ifp->driver == NULL) return;
|
||||
mg_tcpip_poll(mgr->ifp, now);
|
||||
for (c = mgr->conns; c != NULL; c = tmp) {
|
||||
|
||||
Reference in new issue
Block a user