Daniele Lacamera / PicoTCP Featured

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 RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling 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.

Committer:
tass
Date:
Mon Sep 02 08:02:21 2013 +0000
Revision:
51:ab4529a384a6
Parent:
29:1a47b7151851
Updated from masterbranch

Who changed what in which revision?

UserRevisionLine numberNew contents of line
daniele 29:1a47b7151851 1 /*********************************************************************
daniele 29:1a47b7151851 2 PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved.
daniele 29:1a47b7151851 3 See LICENSE and COPYING for usage.
daniele 29:1a47b7151851 4 Do not redistribute without a written permission by the Copyright
daniele 29:1a47b7151851 5 holders.
daniele 29:1a47b7151851 6
daniele 29:1a47b7151851 7 File: pico_mbed.h
daniele 29:1a47b7151851 8 Author: Toon Peters
daniele 29:1a47b7151851 9 *********************************************************************/
daniele 29:1a47b7151851 10
daniele 29:1a47b7151851 11 #ifndef PICO_SUPPORT_MBED
daniele 29:1a47b7151851 12 #define PICO_SUPPORT_MBED
daniele 29:1a47b7151851 13
daniele 29:1a47b7151851 14 //#include "mbed.h"
daniele 29:1a47b7151851 15 //#include "serial_api.h"
daniele 29:1a47b7151851 16
daniele 29:1a47b7151851 17 /*
daniele 29:1a47b7151851 18 Debug needs initialization:
daniele 29:1a47b7151851 19 * void serial_init (serial_t *obj, PinName tx, PinName rx);
daniele 29:1a47b7151851 20 * void serial_baud (serial_t *obj, int baudrate);
daniele 29:1a47b7151851 21 * void serial_format (serial_t *obj, int data_bits, SerialParity parity, int stop_bits);
daniele 29:1a47b7151851 22 */
daniele 29:1a47b7151851 23
daniele 29:1a47b7151851 24 #define dbg(...)
daniele 29:1a47b7151851 25 #define pico_zalloc(x) calloc(x, 1)
daniele 29:1a47b7151851 26 #define pico_free(x) free(x)
daniele 29:1a47b7151851 27
daniele 29:1a47b7151851 28
daniele 29:1a47b7151851 29 #define PICO_SUPPORT_MUTEX
daniele 29:1a47b7151851 30 extern void *pico_mutex_init(void);
daniele 29:1a47b7151851 31 extern void pico_mutex_lock(void*);
daniele 29:1a47b7151851 32 extern void pico_mutex_unlock(void*);
daniele 29:1a47b7151851 33
daniele 29:1a47b7151851 34
daniele 29:1a47b7151851 35 extern uint32_t os_time;
daniele 29:1a47b7151851 36
daniele 29:1a47b7151851 37 static inline unsigned long PICO_TIME(void)
daniele 29:1a47b7151851 38 {
daniele 29:1a47b7151851 39 return (unsigned long)os_time / 1000;
daniele 29:1a47b7151851 40 }
daniele 29:1a47b7151851 41
daniele 29:1a47b7151851 42 static inline unsigned long PICO_TIME_MS(void)
daniele 29:1a47b7151851 43 {
daniele 29:1a47b7151851 44 return (unsigned long)os_time;
daniele 29:1a47b7151851 45 }
daniele 29:1a47b7151851 46
daniele 29:1a47b7151851 47 static inline void PICO_IDLE(void)
daniele 29:1a47b7151851 48 {
daniele 29:1a47b7151851 49 // TODO needs implementation
daniele 29:1a47b7151851 50 }
daniele 29:1a47b7151851 51 /*
daniele 29:1a47b7151851 52 static inline void PICO_DEBUG(const char * formatter, ... )
daniele 29:1a47b7151851 53 {
daniele 29:1a47b7151851 54 char buffer[256];
daniele 29:1a47b7151851 55 char *ptr;
daniele 29:1a47b7151851 56 va_list args;
daniele 29:1a47b7151851 57 va_start(args, formatter);
daniele 29:1a47b7151851 58 vsnprintf(buffer, 256, formatter, args);
daniele 29:1a47b7151851 59 ptr = buffer;
daniele 29:1a47b7151851 60 while(*ptr != '\0')
daniele 29:1a47b7151851 61 serial_putc(serial_t *obj, (int) (*(ptr++)));
daniele 29:1a47b7151851 62 va_end(args);
daniele 29:1a47b7151851 63 //TODO implement serial_t
daniele 29:1a47b7151851 64 }*/
daniele 29:1a47b7151851 65
daniele 29:1a47b7151851 66 #endif