Wykres commitów

120 Commity (69719927f1752b2d6333708c5b60067fe3b7965d)

Autor SHA1 Wiadomość Data
Damien George 6d2e9e70b3 extmod/modlwip: Check for state change during recv busy-wait loop.
For example, the peer may close the connection while recv is waiting for
incoming data.
2016-03-09 12:29:40 +07:00
Paul Sokolovsky 6185dc5f3d extmod/modlwip: Add stream .read() and .readline() methods. 2016-03-09 09:20:22 +07:00
Paul Sokolovsky f1919b7c98 extmod/modlwip: Add dummy .makefile() method. 2016-03-09 09:14:45 +07:00
Paul Sokolovsky c7fb87caff extmod/modlwip: Add stream protocol read method. 2016-03-09 09:12:32 +07:00
Paul Sokolovsky ed593780bf extmod/modlwip: Implement dummy setsockopt(). 2016-03-08 14:24:49 +07:00
Paul Sokolovsky f8d42da104 extmod/modlwip: Add .print() method. 2016-03-08 11:37:15 +07:00
Paul Sokolovsky 04a9ac7f38 extmod/modlwip: Update make_new() arguments for recent refactor. 2016-03-08 10:31:21 +07:00
Paul Sokolovsky fb7b715b7b extmod/modlwip: Use _ERR_BADF instead of magic number. 2015-12-30 16:43:35 +02:00
Paul Sokolovsky bc25545fbb extmod/modlwip: Avoid magic numeric values in memcpy(). 2015-12-30 16:40:23 +02:00
Paul Sokolovsky 722fb2d251 extmod/modlwip: User proper field name and value names for socket state. 2015-12-30 16:26:23 +02:00
Paul Sokolovsky fff2dd2627 extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile.
Any fields changed by asynchronous callbacks must be volatile.
2015-12-29 21:02:02 +02:00
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.
2015-12-29 20:37:22 +02:00
Galen Hazelwood af3e45419c extmod/lwip: Change void pointers to unions, include new mphal.h file 2015-11-04 23:24:04 +03:00
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.
2015-10-31 19:51:23 +03:00
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.
2015-10-27 23:31:42 +03:00
Paul Sokolovsky 858ed6d2f7 extmod/modlwip: Codestyle: no need for () when taking address of primary expr.
Like foo.bar or foo->bar.
2015-10-27 01:39:57 +03:00
Paul Sokolovsky fa87e90cfa extmod/modlwip: lwip_tcp_send(): Common subexpression elimination, use MIN(). 2015-10-27 01:39:57 +03:00
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).
2015-10-27 01:39:57 +03:00
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 .
2015-10-27 00:04:59 +03:00
Galen Hazelwood 805c6534f8 extmod/modlwip: Initial commit of the lwip network stack module 2015-10-23 19:30:02 +03:00