Core networking libraries including LwIP implementation

Dependencies:   DebugLib Socket lwip lwip-sys

Dependents:   EthernetInterface

Fork of NetworkingCoreLib by Donatien Garnier

Committer:
donatien
Date:
Fri Jun 22 16:18:09 2012 +0000
Revision:
15:cf5f669a30bc
Parent:
13:f7d8c8088289
DebugLib up

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 13:f7d8c8088289 1 /* fwk.h */
donatien 13:f7d8c8088289 2 /* Copyright (C) 2012 mbed.org, MIT License
donatien 13:f7d8c8088289 3 *
donatien 13:f7d8c8088289 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
donatien 13:f7d8c8088289 5 * and associated documentation files (the "Software"), to deal in the Software without restriction,
donatien 13:f7d8c8088289 6 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
donatien 13:f7d8c8088289 7 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
donatien 13:f7d8c8088289 8 * furnished to do so, subject to the following conditions:
donatien 0:013f5d54248c 9 *
donatien 13:f7d8c8088289 10 * The above copyright notice and this permission notice shall be included in all copies or
donatien 13:f7d8c8088289 11 * substantial portions of the Software.
donatien 13:f7d8c8088289 12 *
donatien 13:f7d8c8088289 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
donatien 13:f7d8c8088289 14 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
donatien 13:f7d8c8088289 15 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
donatien 13:f7d8c8088289 16 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
donatien 13:f7d8c8088289 17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
donatien 0:013f5d54248c 18 */
donatien 0:013f5d54248c 19
donatien 0:013f5d54248c 20 #ifndef FWK_H_
donatien 0:013f5d54248c 21 #define FWK_H_
donatien 0:013f5d54248c 22
donatien 0:013f5d54248c 23 #include "config.h"
donatien 0:013f5d54248c 24
donatien 0:013f5d54248c 25 #include "string.h"
donatien 0:013f5d54248c 26 //using namespace std;
donatien 0:013f5d54248c 27
donatien 0:013f5d54248c 28 #include "stdint.h"
donatien 0:013f5d54248c 29 typedef unsigned int size_t;
donatien 0:013f5d54248c 30
donatien 0:013f5d54248c 31 #ifndef __cplusplus
donatien 0:013f5d54248c 32 //boolean type compatibility
donatien 0:013f5d54248c 33 typedef byte bool;
donatien 0:013f5d54248c 34 #define true 1
donatien 0:013f5d54248c 35 #define false 0
donatien 0:013f5d54248c 36 #endif
donatien 0:013f5d54248c 37
donatien 0:013f5d54248c 38 #ifndef NULL
donatien 0:013f5d54248c 39 #define NULL ((void*)0)
donatien 0:013f5d54248c 40 #endif
donatien 0:013f5d54248c 41
donatien 0:013f5d54248c 42 #define CR '\x0D'
donatien 0:013f5d54248c 43 #define LF '\x0A'
donatien 0:013f5d54248c 44 #define GD '\x3E'
donatien 0:013f5d54248c 45 #define BRK '\x1A'
donatien 0:013f5d54248c 46
donatien 0:013f5d54248c 47 //Custom utility classes
donatien 0:013f5d54248c 48 #include "IOStream.h"
donatien 0:013f5d54248c 49 //#include "String.h"
donatien 0:013f5d54248c 50
donatien 0:013f5d54248c 51 //Error codes
donatien 0:013f5d54248c 52 #include "errors.h"
donatien 0:013f5d54248c 53
donatien 0:013f5d54248c 54 //Debug
donatien 0:013f5d54248c 55 #include "dbg.h"
donatien 0:013f5d54248c 56
donatien 0:013f5d54248c 57 //Utility macros
donatien 0:013f5d54248c 58 #define MIN(x,y) (((x)<(y))?(x):(y))
donatien 0:013f5d54248c 59 #define MAX(x,y) (((x)>(y))?(x):(y))
donatien 0:013f5d54248c 60
donatien 0:013f5d54248c 61 #endif /* FWK_H_ */