ProjetoBB

Dependencies:   F7_Ethernet WebSocketClient mbed mcp3008

Fork of Nucleo_F746ZG_Ethernet by Dieter Graef

Committer:
DieterGraef
Date:
Sat Jun 18 10:49:12 2016 +0000
Revision:
0:f9b6112278fe
Ethernet for the NUCLEO STM32F746 Board Testprogram uses DHCP and NTP to set the clock

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DieterGraef 0:f9b6112278fe 1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DieterGraef 0:f9b6112278fe 2 // Copyright (c) Microsoft Corporation. All rights reserved.
DieterGraef 0:f9b6112278fe 3 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DieterGraef 0:f9b6112278fe 4
DieterGraef 0:f9b6112278fe 5 #ifndef _DRIVERS_NETWORK_DEFINES_H_
DieterGraef 0:f9b6112278fe 6 #define _DRIVERS_NETWORK_DEFINES_H_ 1
DieterGraef 0:f9b6112278fe 7
DieterGraef 0:f9b6112278fe 8 #define NETWORK_MAX_PACKETSIZE 1514
DieterGraef 0:f9b6112278fe 9
DieterGraef 0:f9b6112278fe 10 //--// The Number of packet buffer pools. Each packet buffer pool
DieterGraef 0:f9b6112278fe 11 //--// contains one or more packet buffers of the same size.
DieterGraef 0:f9b6112278fe 12
DieterGraef 0:f9b6112278fe 13 #define NETWORK_MEMORY_POOL_SSL_SIZE__min ( 64*1024)
DieterGraef 0:f9b6112278fe 14 #define NETWORK_MEMORY_POOL_SSL_SIZE__default (128*1024)
DieterGraef 0:f9b6112278fe 15 #define NETWORK_MEMORY_POOL_SSL_SIZE__max (256*1024)
DieterGraef 0:f9b6112278fe 16
DieterGraef 0:f9b6112278fe 17 #if defined(NETWORK_MEMORY_POOL__INCLUDE_SSL)
DieterGraef 0:f9b6112278fe 18 #define NETWORK_MEMORY_POOL_SSL_SIZE 1
DieterGraef 0:f9b6112278fe 19 #else
DieterGraef 0:f9b6112278fe 20 #define NETWORK_MEMORY_POOL_SSL_SIZE 0
DieterGraef 0:f9b6112278fe 21 #endif
DieterGraef 0:f9b6112278fe 22
DieterGraef 0:f9b6112278fe 23 #define NETWORK_MEMORY_POOL__SIZE__min (( 32*1024) + (NETWORK_MEMORY_POOL_SSL_SIZE * NETWORK_MEMORY_POOL_SSL_SIZE__min))
DieterGraef 0:f9b6112278fe 24 #define NETWORK_MEMORY_POOL__SIZE__default ((128*1024) + (NETWORK_MEMORY_POOL_SSL_SIZE * NETWORK_MEMORY_POOL_SSL_SIZE__default))
DieterGraef 0:f9b6112278fe 25 #define NETWORK_MEMORY_POOL__SIZE__max ((256*1024) + (NETWORK_MEMORY_POOL_SSL_SIZE * NETWORK_MEMORY_POOL_SSL_SIZE__max))
DieterGraef 0:f9b6112278fe 26
DieterGraef 0:f9b6112278fe 27 #define NETWORK_PACKET_POOL_0__NUM_PACKETS__min 5
DieterGraef 0:f9b6112278fe 28 #define NETWORK_PACKET_POOL_0__NUM_PACKETS__default 10
DieterGraef 0:f9b6112278fe 29 #define NETWORK_PACKET_POOL_0__NUM_PACKETS__max 20
DieterGraef 0:f9b6112278fe 30 #define NETWORK_PACKET_POOL_0__PACKET_SIZE 128
DieterGraef 0:f9b6112278fe 31
DieterGraef 0:f9b6112278fe 32 #define NETWORK_PACKET_POOL_1__NUM_PACKETS__min 5
DieterGraef 0:f9b6112278fe 33 #define NETWORK_PACKET_POOL_1__NUM_PACKETS__default 20
DieterGraef 0:f9b6112278fe 34 #define NETWORK_PACKET_POOL_1__NUM_PACKETS__max 30
DieterGraef 0:f9b6112278fe 35 #define NETWORK_PACKET_POOL_1__PACKET_SIZE 256
DieterGraef 0:f9b6112278fe 36
DieterGraef 0:f9b6112278fe 37 #define NETWORK_PACKET_POOL_2__NUM_PACKETS__min 5
DieterGraef 0:f9b6112278fe 38 #define NETWORK_PACKET_POOL_2__NUM_PACKETS__default 10
DieterGraef 0:f9b6112278fe 39 #define NETWORK_PACKET_POOL_2__NUM_PACKETS__max 30
DieterGraef 0:f9b6112278fe 40 #define NETWORK_PACKET_POOL_2__PACKET_SIZE 512
DieterGraef 0:f9b6112278fe 41
DieterGraef 0:f9b6112278fe 42 #define NETWORK_PACKET_POOL_3__NUM_PACKETS__min 4
DieterGraef 0:f9b6112278fe 43 #define NETWORK_PACKET_POOL_3__NUM_PACKETS__default 18
DieterGraef 0:f9b6112278fe 44 #define NETWORK_PACKET_POOL_3__NUM_PACKETS__max 30
DieterGraef 0:f9b6112278fe 45 #define NETWORK_PACKET_POOL_3__PACKET_SIZE 1514
DieterGraef 0:f9b6112278fe 46
DieterGraef 0:f9b6112278fe 47 #define NETWORK_PACKET_POOL_4__NUM_PACKETS__min 4
DieterGraef 0:f9b6112278fe 48 #define NETWORK_PACKET_POOL_4__NUM_PACKETS__default 15
DieterGraef 0:f9b6112278fe 49 #define NETWORK_PACKET_POOL_4__NUM_PACKETS__max 40
DieterGraef 0:f9b6112278fe 50 #define NETWORK_PACKET_POOL_4__PACKET_SIZE 1514
DieterGraef 0:f9b6112278fe 51
DieterGraef 0:f9b6112278fe 52 #define NETWORK_PACKET_POOL_5__NUM_PACKETS__min 0
DieterGraef 0:f9b6112278fe 53 #define NETWORK_PACKET_POOL_5__NUM_PACKETS__default 0
DieterGraef 0:f9b6112278fe 54 #define NETWORK_PACKET_POOL_5__NUM_PACKETS__max 40
DieterGraef 0:f9b6112278fe 55 #define NETWORK_PACKET_POOL_5__PACKET_SIZE 0
DieterGraef 0:f9b6112278fe 56
DieterGraef 0:f9b6112278fe 57 //--//
DieterGraef 0:f9b6112278fe 58
DieterGraef 0:f9b6112278fe 59 #define NETWORK_NUM_IFACES__min 1
DieterGraef 0:f9b6112278fe 60 #define NETWORK_NUM_IFACES__default 1 // loopback is added if NETWORK_USE_LOOPBACK is defined
DieterGraef 0:f9b6112278fe 61 #define NETWORK_NUM_IFACES__max 4
DieterGraef 0:f9b6112278fe 62
DieterGraef 0:f9b6112278fe 63 #define NETWORK_NUM_DEVICES__min 2 // TODO: WHY ISNT THIS IN THE EBSNET SPREADSHEET?
DieterGraef 0:f9b6112278fe 64 #define NETWORK_NUM_DEVICES__default 4
DieterGraef 0:f9b6112278fe 65 #define NETWORK_NUM_DEVICES__max 10
DieterGraef 0:f9b6112278fe 66
DieterGraef 0:f9b6112278fe 67 #define NETWORK_MULTICAST_LIST_SIZE__min 2
DieterGraef 0:f9b6112278fe 68 #define NETWORK_MULTICAST_LIST_SIZE__default 5
DieterGraef 0:f9b6112278fe 69 #define NETWORK_MULTICAST_LIST_SIZE__max 20
DieterGraef 0:f9b6112278fe 70
DieterGraef 0:f9b6112278fe 71 #define NETWORK_ROUTINGTABLE_SIZE__min 5
DieterGraef 0:f9b6112278fe 72 #define NETWORK_ROUTINGTABLE_SIZE__default 10
DieterGraef 0:f9b6112278fe 73 #define NETWORK_ROUTINGTABLE_SIZE__max 50
DieterGraef 0:f9b6112278fe 74
DieterGraef 0:f9b6112278fe 75 #define NETWORK_ARP_NUM_TABLE_ENTRIES__min 3
DieterGraef 0:f9b6112278fe 76 #define NETWORK_ARP_NUM_TABLE_ENTRIES__default 5 //CFG_ARPCLEN
DieterGraef 0:f9b6112278fe 77 #define NETWORK_ARP_NUM_TABLE_ENTRIES__max 50
DieterGraef 0:f9b6112278fe 78
DieterGraef 0:f9b6112278fe 79 #define NETWORK_FRAG_TABLE_SIZE__min 2
DieterGraef 0:f9b6112278fe 80 #define NETWORK_FRAG_TABLE_SIZE__default 6
DieterGraef 0:f9b6112278fe 81 #define NETWORK_FRAG_TABLE_SIZE__max 10
DieterGraef 0:f9b6112278fe 82
DieterGraef 0:f9b6112278fe 83 #define NETWORK_NAT_NUM_ENTRIES__min 5
DieterGraef 0:f9b6112278fe 84 #define NETWORK_NAT_NUM_ENTRIES__default 25
DieterGraef 0:f9b6112278fe 85 #define NETWORK_NAT_NUM_ENTRIES__max 40
DieterGraef 0:f9b6112278fe 86
DieterGraef 0:f9b6112278fe 87 #define NETWORK_TCP_NUM_PORTS__SUPPORTED__min 16
DieterGraef 0:f9b6112278fe 88 #define NETWORK_TCP_NUM_PORTS__SUPPORTED__default 64
DieterGraef 0:f9b6112278fe 89 #define NETWORK_TCP_NUM_PORTS__SUPPORTED__max 128
DieterGraef 0:f9b6112278fe 90
DieterGraef 0:f9b6112278fe 91 #define NETWORK_UDP_NUM_PORTS__SUPPORTED__min 6
DieterGraef 0:f9b6112278fe 92 #define NETWORK_UDP_NUM_PORTS__SUPPORTED__default 64
DieterGraef 0:f9b6112278fe 93 #define NETWORK_UDP_NUM_PORTS__SUPPORTED__max 128
DieterGraef 0:f9b6112278fe 94
DieterGraef 0:f9b6112278fe 95
DieterGraef 0:f9b6112278fe 96 //--// Configurable timeout parameters
DieterGraef 0:f9b6112278fe 97
DieterGraef 0:f9b6112278fe 98 #define NETWORK_DHCP_RETRIES__default 5
DieterGraef 0:f9b6112278fe 99 #define NETWORK_DHCP_TIMEOUT__default 8
DieterGraef 0:f9b6112278fe 100
DieterGraef 0:f9b6112278fe 101 #define NETWORK_IGMPV1_MAX_DELAY__default 10
DieterGraef 0:f9b6112278fe 102
DieterGraef 0:f9b6112278fe 103 #define NETWORK_ARP_REQ_TIMEOUT__default 2
DieterGraef 0:f9b6112278fe 104 #define NETWORK_ARP_MAX_RETRIES__default 4
DieterGraef 0:f9b6112278fe 105 #define NETWORK_ARP_RES_TIMEOUT__default 600
DieterGraef 0:f9b6112278fe 106
DieterGraef 0:f9b6112278fe 107 #define NETWORK_DNS_MIN_DELAY__default 2
DieterGraef 0:f9b6112278fe 108 #define NETWORK_DNS_MAX_DELAY__default 2
DieterGraef 0:f9b6112278fe 109 #define NETWORK_DNS_RETRIES__default 2
DieterGraef 0:f9b6112278fe 110
DieterGraef 0:f9b6112278fe 111
DieterGraef 0:f9b6112278fe 112 //--// RAM Profiles
DieterGraef 0:f9b6112278fe 113
DieterGraef 0:f9b6112278fe 114 #ifdef NETWORK_MEMORY_PROFILE__small
DieterGraef 0:f9b6112278fe 115 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_0__NUM_PACKETS NETWORK_PACKET_POOL_0__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 116 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_1__NUM_PACKETS NETWORK_PACKET_POOL_1__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 117 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_2__NUM_PACKETS NETWORK_PACKET_POOL_2__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 118 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_3__NUM_PACKETS NETWORK_PACKET_POOL_3__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 119 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_4__NUM_PACKETS NETWORK_PACKET_POOL_4__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 120 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_5__NUM_PACKETS NETWORK_PACKET_POOL_5__NUM_PACKETS__min
DieterGraef 0:f9b6112278fe 121 #define PLATFORM_DEPENDENT__NETWORK_NUM_IFACES NETWORK_NUM_IFACES__min
DieterGraef 0:f9b6112278fe 122 #define PLATFORM_DEPENDENT__NETWORK_NUM_DEVICES NETWORK_NUM_DEVICES__min
DieterGraef 0:f9b6112278fe 123 #define PLATFORM_DEPENDENT__NETWORK_MULTICAST_LIST_SIZE NETWORK_MULTICAST_LIST_SIZE__min
DieterGraef 0:f9b6112278fe 124 #define PLATFORM_DEPENDENT__NETWORK_ROUTINGTABLE_SIZE NETWORK_ROUTINGTABLE_SIZE__min
DieterGraef 0:f9b6112278fe 125 #define PLATFORM_DEPENDENT__NETWORK_ARP_NUM_TABLE_ENTRIES NETWORK_ARP_NUM_TABLE_ENTRIES__min
DieterGraef 0:f9b6112278fe 126 #define PLATFORM_DEPENDENT__NETWORK_FRAG_TABLE_SIZE NETWORK_FRAG_TABLE_SIZE__min
DieterGraef 0:f9b6112278fe 127 #define PLATFORM_DEPENDENT__NETWORK_NAT_NUM_ENTRIES NETWORK_NAT_NUM_ENTRIES__min
DieterGraef 0:f9b6112278fe 128 #define PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED NETWORK_TCP_NUM_PORTS__SUPPORTED__min
DieterGraef 0:f9b6112278fe 129 #define PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED NETWORK_UDP_NUM_PORTS__SUPPORTED__min
DieterGraef 0:f9b6112278fe 130 #define PLATFORM_DEPENDENT__NETWORK_MEMORY_POOL__SIZE NETWORK_MEMORY_POOL__SIZE__min
DieterGraef 0:f9b6112278fe 131 #define PLATFORM_DEPENDENT__SOCKETS_MAX_COUNT (PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED + PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED)
DieterGraef 0:f9b6112278fe 132 #endif
DieterGraef 0:f9b6112278fe 133
DieterGraef 0:f9b6112278fe 134 #ifdef NETWORK_MEMORY_PROFILE__medium
DieterGraef 0:f9b6112278fe 135 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_0__NUM_PACKETS NETWORK_PACKET_POOL_0__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 136 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_1__NUM_PACKETS NETWORK_PACKET_POOL_1__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 137 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_2__NUM_PACKETS NETWORK_PACKET_POOL_2__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 138 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_3__NUM_PACKETS NETWORK_PACKET_POOL_3__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 139 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_4__NUM_PACKETS NETWORK_PACKET_POOL_4__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 140 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_5__NUM_PACKETS NETWORK_PACKET_POOL_5__NUM_PACKETS__default
DieterGraef 0:f9b6112278fe 141 #define PLATFORM_DEPENDENT__NETWORK_NUM_IFACES NETWORK_NUM_IFACES__default
DieterGraef 0:f9b6112278fe 142 #define PLATFORM_DEPENDENT__NETWORK_NUM_DEVICES NETWORK_NUM_DEVICES__default
DieterGraef 0:f9b6112278fe 143 #define PLATFORM_DEPENDENT__NETWORK_MULTICAST_LIST_SIZE NETWORK_MULTICAST_LIST_SIZE__default
DieterGraef 0:f9b6112278fe 144 #define PLATFORM_DEPENDENT__NETWORK_ROUTINGTABLE_SIZE NETWORK_ROUTINGTABLE_SIZE__default
DieterGraef 0:f9b6112278fe 145 #define PLATFORM_DEPENDENT__NETWORK_ARP_NUM_TABLE_ENTRIES NETWORK_ARP_NUM_TABLE_ENTRIES__default
DieterGraef 0:f9b6112278fe 146 #define PLATFORM_DEPENDENT__NETWORK_FRAG_TABLE_SIZE NETWORK_FRAG_TABLE_SIZE__default
DieterGraef 0:f9b6112278fe 147 #define PLATFORM_DEPENDENT__NETWORK_NAT_NUM_ENTRIES NETWORK_NAT_NUM_ENTRIES__default
DieterGraef 0:f9b6112278fe 148 #define PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED NETWORK_TCP_NUM_PORTS__SUPPORTED__default
DieterGraef 0:f9b6112278fe 149 #define PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED NETWORK_UDP_NUM_PORTS__SUPPORTED__default
DieterGraef 0:f9b6112278fe 150 #define PLATFORM_DEPENDENT__NETWORK_MEMORY_POOL__SIZE NETWORK_MEMORY_POOL__SIZE__default
DieterGraef 0:f9b6112278fe 151 #define PLATFORM_DEPENDENT__SOCKETS_MAX_COUNT (PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED + PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED)
DieterGraef 0:f9b6112278fe 152 #endif
DieterGraef 0:f9b6112278fe 153
DieterGraef 0:f9b6112278fe 154 #ifdef NETWORK_MEMORY_PROFILE__large
DieterGraef 0:f9b6112278fe 155 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_0__NUM_PACKETS NETWORK_PACKET_POOL_0__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 156 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_1__NUM_PACKETS NETWORK_PACKET_POOL_1__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 157 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_2__NUM_PACKETS NETWORK_PACKET_POOL_2__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 158 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_3__NUM_PACKETS NETWORK_PACKET_POOL_3__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 159 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_4__NUM_PACKETS NETWORK_PACKET_POOL_4__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 160 #define PLATFORM_DEPENDENT__NETWORK_PACKET_POOL_5__NUM_PACKETS NETWORK_PACKET_POOL_5__NUM_PACKETS__max
DieterGraef 0:f9b6112278fe 161 #define PLATFORM_DEPENDENT__NETWORK_NUM_IFACES NETWORK_NUM_IFACES__max
DieterGraef 0:f9b6112278fe 162 #define PLATFORM_DEPENDENT__NETWORK_NUM_DEVICES NETWORK_NUM_DEVICES__max
DieterGraef 0:f9b6112278fe 163 #define PLATFORM_DEPENDENT__NETWORK_MULTICAST_LIST_SIZE NETWORK_MULTICAST_LIST_SIZE__max
DieterGraef 0:f9b6112278fe 164 #define PLATFORM_DEPENDENT__NETWORK_ROUTINGTABLE_SIZE NETWORK_ROUTINGTABLE_SIZE__max
DieterGraef 0:f9b6112278fe 165 #define PLATFORM_DEPENDENT__NETWORK_ARP_NUM_TABLE_ENTRIES NETWORK_ARP_NUM_TABLE_ENTRIES__max
DieterGraef 0:f9b6112278fe 166 #define PLATFORM_DEPENDENT__NETWORK_FRAG_TABLE_SIZE NETWORK_FRAG_TABLE_SIZE__max
DieterGraef 0:f9b6112278fe 167 #define PLATFORM_DEPENDENT__NETWORK_NAT_NUM_ENTRIES NETWORK_NAT_NUM_ENTRIES__max
DieterGraef 0:f9b6112278fe 168 #define PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED NETWORK_TCP_NUM_PORTS__SUPPORTED__max
DieterGraef 0:f9b6112278fe 169 #define PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED NETWORK_UDP_NUM_PORTS__SUPPORTED__max
DieterGraef 0:f9b6112278fe 170 #define PLATFORM_DEPENDENT__NETWORK_MEMORY_POOL__SIZE NETWORK_MEMORY_POOL__SIZE__max
DieterGraef 0:f9b6112278fe 171 #define PLATFORM_DEPENDENT__SOCKETS_MAX_COUNT (PLATFORM_DEPENDENT__NETWORK_TCP_NUM_PORTS__SUPPORTED + PLATFORM_DEPENDENT__NETWORK_UDP_NUM_PORTS__SUPPORTED)
DieterGraef 0:f9b6112278fe 172 #endif
DieterGraef 0:f9b6112278fe 173
DieterGraef 0:f9b6112278fe 174 #endif // _DRIVERS_NETWORK_DEFINES_H_
DieterGraef 0:f9b6112278fe 175