Free (GPLv2) TCP/IP stack developed by TASS Belgium
Dependents: lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more
PicoTCP. Copyright (c) 2013 TASS Belgium NV.
Released under the GNU General Public License, version 2.
Different licensing models may exist, at the sole discretion of the Copyright holders.
Official homepage: http://www.picotcp.com
Bug tracker: https://github.com/tass-belgium/picotcp/issues
Development steps:
initial integration with mbed RTOSgeneric mbed Ethernet driverhigh performance NXP LPC1768 specific Ethernet driverMulti-threading support for mbed RTOSBerkeley sockets and integration with the New Socket APIFork of the apps running on top of the New Socket APIScheduling optimizations- Debugging/benchmarking/testing
Demo application (measuring TCP sender performance):
Import programlpc1768-picotcp-demo
A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.
Diff: Socket/bsd/stack_endpoint.cpp
- Revision:
- 33:d8af3f85a484
- Parent:
- 32:865c101e0874
- Child:
- 34:d868bb69114e
--- a/Socket/bsd/stack_endpoint.cpp Thu Jun 20 12:36:39 2013 +0000 +++ b/Socket/bsd/stack_endpoint.cpp Thu Jun 20 13:43:13 2013 +0000 @@ -15,9 +15,6 @@ //#define ptsock_dbg printf #define ptsock_dbg(...) -#define TRUE 1 -#define FALSE 0 - int in_the_stack = 0; Mutex *PicoTcpLock; Queue<void,16> *PicoTcpEvents; @@ -159,7 +156,7 @@ PicoTcpLock->lock(); pico_socket_connect(ep->s, (struct pico_ip4 *)(&srv_addr->sin_addr.s_addr), srv_addr->sin_port); ep->events = PICO_SOCK_EV_CONN | PICO_SOCK_EV_ERR; - __critical_select(ep, osWaitForever, TRUE); + __critical_select(ep, osWaitForever, 1); if ((ep->revents & PICO_SOCK_EV_CONN) && ep->connected) { ep->revents &= (~PICO_SOCK_EV_CONN); ep->revents |= PICO_SOCK_EV_WR; @@ -187,7 +184,7 @@ PicoTcpLock->lock(); ep->events = PICO_SOCK_EV_CONN | PICO_SOCK_EV_ERR; - __critical_select(ep, osWaitForever, TRUE); + __critical_select(ep, osWaitForever, 1); if (ep->revents & PICO_SOCK_EV_CONN) { printf("Calling Accept\n"); aep->s = pico_socket_accept(ep->s, (struct pico_ip4 *)(&cli_addr->sin_addr.s_addr), &cli_addr->sin_port); @@ -221,7 +218,7 @@ } if (write) ep->events |= PICO_SOCK_EV_WR; - ret = __critical_select(ep, ep->timeout,FALSE); + ret = __critical_select(ep, ep->timeout, 0); return ret; }