|
| 1 | +[#ftl] |
| 2 | +/** |
| 3 | + ****************************************************************************** |
| 4 | + * File Name : ${name} |
| 5 | + * Description : This file provides code for the configuration |
| 6 | + * of the ${name} instances. |
| 7 | + ****************************************************************************** |
| 8 | +[@common.optinclude name=mxTmpFolder+"/license.tmp"/][#--include License text --] |
| 9 | + ****************************************************************************** |
| 10 | + */ |
| 11 | +[#assign s = name] |
| 12 | +[#assign toto = s?replace(".","_")] |
| 13 | +[#assign toto = toto?replace("/","")] |
| 14 | +[#assign toto = toto?replace("-","_")] |
| 15 | +[#assign inclusion_protection = toto?upper_case] |
| 16 | +/* Define to prevent recursive inclusion -------------------------------------*/ |
| 17 | +#ifndef __${inclusion_protection}__ |
| 18 | +#define __${inclusion_protection}__ |
| 19 | + |
| 20 | +#ifdef __cplusplus |
| 21 | + extern "C" { |
| 22 | +#endif |
| 23 | + |
| 24 | + |
| 25 | +/* Includes ------------------------------------------------------------------*/ |
| 26 | +[#if includes??] |
| 27 | +[#list includes as include] |
| 28 | +#include "${include}" |
| 29 | +[/#list] |
| 30 | +[/#if] |
| 31 | + |
| 32 | +[#-- SWIPdatas is a list of SWIPconfigModel --] |
| 33 | +[#list SWIPdatas as SWIP] |
| 34 | +[#-- Global variables --] |
| 35 | +[#if SWIP.variables??] |
| 36 | + [#list SWIP.variables as variable] |
| 37 | +extern ${variable.value} ${variable.name}; |
| 38 | + [/#list] |
| 39 | +[/#if] |
| 40 | + |
| 41 | +[#-- Global variables --] |
| 42 | + |
| 43 | +[#assign instName = SWIP.ipName] |
| 44 | +[#assign fileName = SWIP.fileName] |
| 45 | +[#assign version = SWIP.version] |
| 46 | + |
| 47 | +/** |
| 48 | + MiddleWare name : ${instName} |
| 49 | + MiddleWare fileName : ${fileName} |
| 50 | + MiddleWare version : ${version} |
| 51 | +*/ |
| 52 | +[#if SWIP.defines??] |
| 53 | + [#list SWIP.defines as definition] |
| 54 | +/*---------- [#if definition.comments??]${definition.comments}[/#if] -----------*/ |
| 55 | +#define ${definition.name} #t#t ${definition.value} |
| 56 | +[#if definition.description??]${definition.description} [/#if] |
| 57 | + [/#list] |
| 58 | +[/#if] |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +[/#list] |
| 63 | + |
| 64 | +/* ------------------------------------------------------------------------- */ |
| 65 | +/* Platform */ |
| 66 | +/* ------------------------------------------------------------------------- */ |
| 67 | +#define WOLFIP_STM32_CUBEMX |
| 68 | +#define NO_FILESYSTEM |
| 69 | + |
| 70 | +/* ------------------------------------------------------------------------- */ |
| 71 | +/* Socket Pool Configuration */ |
| 72 | +/* ------------------------------------------------------------------------- */ |
| 73 | +#if defined(WOLFIP_CONF_MAX_TCP) && WOLFIP_CONF_MAX_TCP > 0 |
| 74 | + #define MAX_TCPSOCKETS WOLFIP_CONF_MAX_TCP |
| 75 | +#else |
| 76 | + #define MAX_TCPSOCKETS 4 |
| 77 | +#endif |
| 78 | + |
| 79 | +#if defined(WOLFIP_CONF_MAX_UDP) && WOLFIP_CONF_MAX_UDP > 0 |
| 80 | + #define MAX_UDPSOCKETS WOLFIP_CONF_MAX_UDP |
| 81 | +#else |
| 82 | + #define MAX_UDPSOCKETS 2 |
| 83 | +#endif |
| 84 | + |
| 85 | +#if defined(WOLFIP_CONF_MAX_ICMP) && WOLFIP_CONF_MAX_ICMP > 0 |
| 86 | + #define MAX_ICMPSOCKETS WOLFIP_CONF_MAX_ICMP |
| 87 | +#else |
| 88 | + #define MAX_ICMPSOCKETS 2 |
| 89 | +#endif |
| 90 | + |
| 91 | +/* ------------------------------------------------------------------------- */ |
| 92 | +/* Buffer Configuration */ |
| 93 | +/* ------------------------------------------------------------------------- */ |
| 94 | +#if defined(WOLFIP_CONF_MTU) && WOLFIP_CONF_MTU > 0 |
| 95 | + #define LINK_MTU WOLFIP_CONF_MTU |
| 96 | +#else |
| 97 | + #define LINK_MTU 1536 |
| 98 | +#endif |
| 99 | + |
| 100 | +#define RXBUF_SIZE (LINK_MTU * 16) |
| 101 | +#define TXBUF_SIZE (LINK_MTU * 16) |
| 102 | + |
| 103 | +/* ------------------------------------------------------------------------- */ |
| 104 | +/* Network Configuration */ |
| 105 | +/* ------------------------------------------------------------------------- */ |
| 106 | +#define ETHERNET |
| 107 | +#define MAX_NEIGHBORS 16 |
| 108 | + |
| 109 | +/* ------------------------------------------------------------------------- */ |
| 110 | +/* Enable/Disable Features */ |
| 111 | +/* ------------------------------------------------------------------------- */ |
| 112 | + |
| 113 | +/* DHCP Client */ |
| 114 | +#if defined(WOLFIP_CONF_DHCP) && WOLFIP_CONF_DHCP == 1 |
| 115 | + #define WOLFIP_ENABLE_DHCP |
| 116 | +#endif |
| 117 | + |
| 118 | +/* DNS Client */ |
| 119 | +#if defined(WOLFIP_CONF_DNS) && WOLFIP_CONF_DNS == 1 |
| 120 | + #define WOLFIP_ENABLE_DNS |
| 121 | +#endif |
| 122 | + |
| 123 | +/* Loopback Interface */ |
| 124 | +#undef WOLFIP_ENABLE_LOOPBACK |
| 125 | +#if defined(WOLFIP_CONF_LOOPBACK) && WOLFIP_CONF_LOOPBACK == 1 |
| 126 | + #define WOLFIP_ENABLE_LOOPBACK 1 |
| 127 | + #ifndef WOLFIP_MAX_INTERFACES |
| 128 | + #define WOLFIP_MAX_INTERFACES 2 |
| 129 | + #endif |
| 130 | +#else |
| 131 | + #define WOLFIP_ENABLE_LOOPBACK 0 |
| 132 | +#endif |
| 133 | + |
| 134 | +/* IP Forwarding */ |
| 135 | +#undef WOLFIP_ENABLE_FORWARDING |
| 136 | +#if defined(WOLFIP_CONF_FORWARDING) && WOLFIP_CONF_FORWARDING == 1 |
| 137 | + #define WOLFIP_ENABLE_FORWARDING 1 |
| 138 | +#else |
| 139 | + #define WOLFIP_ENABLE_FORWARDING 0 |
| 140 | +#endif |
| 141 | + |
| 142 | +#ifndef WOLFIP_MAX_INTERFACES |
| 143 | + #define WOLFIP_MAX_INTERFACES 1 |
| 144 | +#endif |
| 145 | + |
| 146 | +/* ------------------------------------------------------------------------- */ |
| 147 | +/* Debugging */ |
| 148 | +/* ------------------------------------------------------------------------- */ |
| 149 | +#if defined(WOLFIP_CONF_DEBUG) && WOLFIP_CONF_DEBUG == 1 |
| 150 | + #define DEBUG |
| 151 | +#else |
| 152 | + #undef DEBUG |
| 153 | +#endif |
| 154 | + |
| 155 | +/* ------------------------------------------------------------------------- */ |
| 156 | +/* wolfSSL Integration */ |
| 157 | +/* ------------------------------------------------------------------------- */ |
| 158 | +/* Define WOLFSSL_WOLFIP to enable wolfSSL IO callbacks for TLS support. |
| 159 | + * Requires wolfSSL Cube Pack to be installed and configured. |
| 160 | + */ |
| 161 | +/* #define WOLFSSL_WOLFIP */ |
| 162 | + |
| 163 | +#ifdef __cplusplus |
| 164 | +} |
| 165 | +#endif |
| 166 | +#endif /* ${inclusion_protection}_H */ |
| 167 | + |
| 168 | +/** |
| 169 | + * @} |
| 170 | + */ |
| 171 | + |
| 172 | +/*****END OF FILE****/ |
0 commit comments