123
Diff: utility/mempool_conf.h
- Revision:
- 8:4acb22344932
- Parent:
- 4:d774541a34da
- Child:
- 9:a156d3de5647
diff -r 1bc7e6120801 -r 4acb22344932 utility/mempool_conf.h --- a/utility/mempool_conf.h Tue Apr 26 18:37:14 2016 +0000 +++ b/utility/mempool_conf.h Fri Jun 30 19:51:28 2017 +0000 @@ -1,31 +1,31 @@ #ifndef MEMPOOLCONF_H - #define MEMPOOLCONF_H - #include "uipethernet-conf.h" +#define MEMPOOLCONF_H +#include "uipethernet-conf.h" extern "C" { - #include "uipopt.h" - #include "enc28j60.h" +#include "uipopt.h" +#include "enc28j60.h" } - #include <inttypes.h> +#include <inttypes.h> typedef uint16_t memaddress; typedef uint8_t memhandle; - #if UIP_SOCKET_NUMPACKETS and UIP_CONNS - #define NUM_TCP_MEMBLOCKS (UIP_SOCKET_NUMPACKETS * 2) * UIP_CONNS - #else - #define NUM_TCP_MEMBLOCKS 0 - #endif - #if UIP_UDP and UIP_UDP_CONNS - #define NUM_UDP_MEMBLOCKS 3 * UIP_UDP_CONNS - #else - #define NUM_UDP_MEMBLOCKS 0 - #endif - #define MEMPOOL_NUM_MEMBLOCKS (NUM_TCP_MEMBLOCKS + NUM_UDP_MEMBLOCKS) - #define MEMPOOL_STARTADDRESS TXSTART_INIT + 1 - #define MEMPOOL_SIZE TXSTOP_INIT - TXSTART_INIT +#if UIP_SOCKET_NUMPACKETS and UIP_CONNS +#define NUM_TCP_MEMBLOCKS (UIP_SOCKET_NUMPACKETS * 2) * UIP_CONNS +#else +#define NUM_TCP_MEMBLOCKS 0 +#endif +#if UIP_UDP and UIP_UDP_CONNS +#define NUM_UDP_MEMBLOCKS 3 * UIP_UDP_CONNS +#else +#define NUM_UDP_MEMBLOCKS 0 +#endif +#define MEMPOOL_NUM_MEMBLOCKS (NUM_TCP_MEMBLOCKS + NUM_UDP_MEMBLOCKS) +#define MEMPOOL_STARTADDRESS TXSTART_INIT + 1 +#define MEMPOOL_SIZE TXSTOP_INIT - TXSTART_INIT -void enc28J60_mempool_block_move_callback(memaddress, memaddress, memaddress); +void enc28J60_mempool_block_move_callback(memaddress, memaddress, memaddress); - #define MEMPOOL_MEMBLOCK_MV(dest, src, size) enc28J60_mempool_block_move_callback(dest, src, size) +#define MEMPOOL_MEMBLOCK_MV(dest, src, size) enc28J60_mempool_block_move_callback(dest, src, size) #endif