fix: restore CH390 bridge flow and sync driver docs

This commit is contained in:
2026-04-03 05:18:02 +08:00
parent 1ef1ba9490
commit fd1fae8ad7
18 changed files with 501 additions and 178 deletions
+7
View File
@@ -104,6 +104,8 @@ static err_t tcp_server_on_accept(void *arg, struct tcp_pcb *newpcb, err_t err)
ctx->status.state = TCP_SERVER_STATE_CONNECTED;
ctx->status.connections++;
tcp_nagle_disable(newpcb);
tcp_arg(newpcb, ctx);
tcp_recv(newpcb, tcp_server_on_recv);
tcp_sent(newpcb, tcp_server_on_sent);
@@ -189,6 +191,11 @@ int tcp_server_send(const uint8_t *data, uint16_t len)
return -1;
}
if ((g_server.client_pcb->flags & TF_RXCLOSED) != 0u) {
g_server.status.errors++;
return -1;
}
if (tcp_sndbuf(g_server.client_pcb) < len) {
return 0;
}