mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
Change driver API: up(ifp) -> poll(ifp, 1second)
Add misc extras required by Wi-Fi drivers (in progress)
This commit is contained in:
1 parent
8906b1ac0f
commit
065027843e
30 files changed
+359
-248
No files matched your search
+3
-3
@@ -110,8 +110,8 @@ static size_t tap_tx(const void *buf, size_t len, struct mg_tcpip_if *ifp) {
|
||||
return (size_t) res;
|
||||
}
|
||||
|
||||
static bool tap_up(struct mg_tcpip_if *ifp) {
|
||||
return ifp->driver_data ? true : false;
|
||||
static bool tap_poll(struct mg_tcpip_if *ifp, bool s1) {
|
||||
return s1 && ifp->driver_data ? true : false;
|
||||
}
|
||||
|
||||
static void eh1(struct mg_connection *c, int ev, void *ev_data) {
|
||||
@@ -412,7 +412,7 @@ int main(void) {
|
||||
memset(&driver, 0, sizeof(driver));
|
||||
|
||||
driver.tx = tap_tx;
|
||||
driver.up = tap_up;
|
||||
driver.poll = tap_poll;
|
||||
driver.rx = tap_rx;
|
||||
|
||||
struct mg_tcpip_if mif;
|
||||
|
||||
Reference in new issue
Block a user