mbed OS5

Fork of UIPEthernet by Zoltan Hudak

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mempool_conf.h Source File

mempool_conf.h

00001 #ifndef MEMPOOLCONF_H
00002 #define MEMPOOLCONF_H
00003 #include "uipethernet-conf.h"
00004 extern "C"
00005 {
00006 #include "uipopt.h"
00007 #include "enc28j60.h"
00008 }
00009 #include <inttypes.h>
00010 
00011 typedef uint16_t    memaddress;
00012 typedef uint8_t     memhandle;
00013 
00014 #if UIP_SOCKET_NUMPACKETS and UIP_CONNS
00015 #define NUM_TCP_MEMBLOCKS   (UIP_SOCKET_NUMPACKETS * 2) * UIP_CONNS
00016 #else
00017 #define NUM_TCP_MEMBLOCKS   0
00018 #endif
00019 #if UIP_UDP and UIP_UDP_CONNS
00020 #define NUM_UDP_MEMBLOCKS   3 * UIP_UDP_CONNS
00021 #else
00022 #define NUM_UDP_MEMBLOCKS   0
00023 #endif
00024 #define MEMPOOL_NUM_MEMBLOCKS   (NUM_TCP_MEMBLOCKS + NUM_UDP_MEMBLOCKS)
00025 #define MEMPOOL_STARTADDRESS    TXSTART_INIT + 1
00026 #define MEMPOOL_SIZE            TXSTOP_INIT - TXSTART_INIT
00027 
00028 void  enc28J60_mempool_block_move_callback(memaddress, memaddress, memaddress);
00029 
00030 #define MEMPOOL_MEMBLOCK_MV(dest, src, size)    enc28J60_mempool_block_move_callback(dest, src, size)
00031 #endif