Paul Sokolovsky
a63d4a6cc2
extmod/modlwip: tcp_recv: Use more regular and responsive poll pattern.
Polling once in 100ms means dismal performance.
TODO: Propagate this pattern to other polling places.
9 years ago
Galen Hazelwood
af3e45419c
extmod/lwip: Change void pointers to unions, include new mphal.h file
9 years ago
Paul Sokolovsky
4deb4936d5
extmod/modlwip: socket->incoming changed by async callbacks, must be volatile.
Otherwise for code like:
while (socket->incoming == NULL) {
LWIP_DELAY(100);
}
a compiler may cache it in a register and it will be an infinite loop.
9 years ago
Paul Sokolovsky
404dae80a9
unix, stmhal: Introduce mp_hal_delay_ms(), mp_hal_ticks_ms().
These MPHAL functions are intended to replace previously used HAL_Delay(),
HAL_GetTick() to provide better naming and MPHAL separation (they are
fully equivalent otherwise).
Also, refactor extmod/modlwip to use them.
9 years ago
Paul Sokolovsky
858ed6d2f7
extmod/modlwip: Codestyle: no need for () when taking address of primary expr.
Like foo.bar or foo->bar.
9 years ago
Paul Sokolovsky
fa87e90cfa
extmod/modlwip: lwip_tcp_send(): Common subexpression elimination, use MIN().
9 years ago
Paul Sokolovsky
76217064ac
extmod/modlwip.c: Codestyle whitespace changes.
With MicroPython codestyle, with pointer casts, "*" packs with primary type
without space. Few other similar changes too (git diff -b -w is null).
9 years ago
Paul Sokolovsky
e0d7740a22
extmod/modlwip: slip: Use stream protocol and be port-independent.
Based on the original patch by Galen Hazelwood:
https://github.com/micropython/micropython/pull/1517 .
9 years ago
Galen Hazelwood
805c6534f8
extmod/modlwip: Initial commit of the lwip network stack module
9 years ago