cc3100_Socket_Wifi_Server with Ethernet Interface not working

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of cc3100_Test_Demo by David Fletcher

Committer:
dflet
Date:
Tue Feb 10 12:09:29 2015 +0000
Revision:
0:e89ba455dbcf
For test only! Not much has been tested, but the 2 demo apps run ok. Alot more work needs to be done!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:e89ba455dbcf 1 /*
dflet 0:e89ba455dbcf 2 * objInclusion.h - CC31xx/CC32xx Host Driver Implementation
dflet 0:e89ba455dbcf 3 *
dflet 0:e89ba455dbcf 4 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
dflet 0:e89ba455dbcf 5 *
dflet 0:e89ba455dbcf 6 *
dflet 0:e89ba455dbcf 7 * Redistribution and use in source and binary forms, with or without
dflet 0:e89ba455dbcf 8 * modification, are permitted provided that the following conditions
dflet 0:e89ba455dbcf 9 * are met:
dflet 0:e89ba455dbcf 10 *
dflet 0:e89ba455dbcf 11 * Redistributions of source code must retain the above copyright
dflet 0:e89ba455dbcf 12 * notice, this list of conditions and the following disclaimer.
dflet 0:e89ba455dbcf 13 *
dflet 0:e89ba455dbcf 14 * Redistributions in binary form must reproduce the above copyright
dflet 0:e89ba455dbcf 15 * notice, this list of conditions and the following disclaimer in the
dflet 0:e89ba455dbcf 16 * documentation and/or other materials provided with the
dflet 0:e89ba455dbcf 17 * distribution.
dflet 0:e89ba455dbcf 18 *
dflet 0:e89ba455dbcf 19 * Neither the name of Texas Instruments Incorporated nor the names of
dflet 0:e89ba455dbcf 20 * its contributors may be used to endorse or promote products derived
dflet 0:e89ba455dbcf 21 * from this software without specific prior written permission.
dflet 0:e89ba455dbcf 22 *
dflet 0:e89ba455dbcf 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
dflet 0:e89ba455dbcf 24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
dflet 0:e89ba455dbcf 25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
dflet 0:e89ba455dbcf 26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
dflet 0:e89ba455dbcf 27 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dflet 0:e89ba455dbcf 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
dflet 0:e89ba455dbcf 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
dflet 0:e89ba455dbcf 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
dflet 0:e89ba455dbcf 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
dflet 0:e89ba455dbcf 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
dflet 0:e89ba455dbcf 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dflet 0:e89ba455dbcf 34 *
dflet 0:e89ba455dbcf 35 */
dflet 0:e89ba455dbcf 36 #ifndef OBJINCLUSION_H_
dflet 0:e89ba455dbcf 37 #define OBJINCLUSION_H_
dflet 0:e89ba455dbcf 38
dflet 0:e89ba455dbcf 39
dflet 0:e89ba455dbcf 40 #include "cc3100_simplelink.h"
dflet 0:e89ba455dbcf 41
dflet 0:e89ba455dbcf 42
dflet 0:e89ba455dbcf 43 /******************************************************************************
dflet 0:e89ba455dbcf 44
dflet 0:e89ba455dbcf 45 For future use
dflet 0:e89ba455dbcf 46
dflet 0:e89ba455dbcf 47 *******************************************************************************/
dflet 0:e89ba455dbcf 48
dflet 0:e89ba455dbcf 49 #define __inln /* if inline functions requiered: #define __inln inline */
dflet 0:e89ba455dbcf 50
dflet 0:e89ba455dbcf 51 #define SL_DEVICE /* Device silo is currently always mandatory */
dflet 0:e89ba455dbcf 52
dflet 0:e89ba455dbcf 53
dflet 0:e89ba455dbcf 54
dflet 0:e89ba455dbcf 55 /******************************************************************************
dflet 0:e89ba455dbcf 56
dflet 0:e89ba455dbcf 57 Qualifiers for package customizations
dflet 0:e89ba455dbcf 58
dflet 0:e89ba455dbcf 59 *******************************************************************************/
dflet 0:e89ba455dbcf 60
dflet 0:e89ba455dbcf 61 #if defined (SL_DEVICE)
dflet 0:e89ba455dbcf 62 #define __dev 1
dflet 0:e89ba455dbcf 63 #else
dflet 0:e89ba455dbcf 64 #define __dev 0
dflet 0:e89ba455dbcf 65 #endif
dflet 0:e89ba455dbcf 66
dflet 0:e89ba455dbcf 67 #if defined (SL_DEVICE) && defined (SL_INC_EXT_API)
dflet 0:e89ba455dbcf 68 #define __dev__ext 1
dflet 0:e89ba455dbcf 69 #else
dflet 0:e89ba455dbcf 70 #define __dev__ext 0
dflet 0:e89ba455dbcf 71 #endif
dflet 0:e89ba455dbcf 72
dflet 0:e89ba455dbcf 73
dflet 0:e89ba455dbcf 74 #if (!defined (SL_PLATFORM_MULTI_THREADED)) || (!defined (SL_PLATFORM_EXTERNAL_SPAWN))
dflet 0:e89ba455dbcf 75 #define __int__spwn 1
dflet 0:e89ba455dbcf 76 #else
dflet 0:e89ba455dbcf 77 #define __int__spwn 0
dflet 0:e89ba455dbcf 78 #endif
dflet 0:e89ba455dbcf 79
dflet 0:e89ba455dbcf 80 #if defined (SL_INC_NET_APP_PKG)
dflet 0:e89ba455dbcf 81 #define __nap 1
dflet 0:e89ba455dbcf 82 #else
dflet 0:e89ba455dbcf 83 #define __nap 0
dflet 0:e89ba455dbcf 84 #endif
dflet 0:e89ba455dbcf 85
dflet 0:e89ba455dbcf 86 #if defined (SL_INC_NET_APP_PKG) && defined (SL_INC_SOCK_CLIENT_SIDE_API)
dflet 0:e89ba455dbcf 87 #define __nap__clt 1
dflet 0:e89ba455dbcf 88 #else
dflet 0:e89ba455dbcf 89 #define __nap__clt 0
dflet 0:e89ba455dbcf 90 #endif
dflet 0:e89ba455dbcf 91
dflet 0:e89ba455dbcf 92 #if defined (SL_INC_NET_APP_PKG) && defined (SL_INC_EXT_API)
dflet 0:e89ba455dbcf 93 #define __nap__ext 1
dflet 0:e89ba455dbcf 94 #else
dflet 0:e89ba455dbcf 95 #define __nap__ext 0
dflet 0:e89ba455dbcf 96 #endif
dflet 0:e89ba455dbcf 97
dflet 0:e89ba455dbcf 98 #if defined (SL_INC_NET_CFG_PKG)
dflet 0:e89ba455dbcf 99 #define __ncg 1
dflet 0:e89ba455dbcf 100 #else
dflet 0:e89ba455dbcf 101 #define __ncg 0
dflet 0:e89ba455dbcf 102 #endif
dflet 0:e89ba455dbcf 103
dflet 0:e89ba455dbcf 104 #if defined (SL_INC_NET_CFG_PKG) && defined (SL_INC_EXT_API)
dflet 0:e89ba455dbcf 105 #define __ncg__ext 1
dflet 0:e89ba455dbcf 106 #else
dflet 0:e89ba455dbcf 107 #define __ncg__ext 0
dflet 0:e89ba455dbcf 108 #endif
dflet 0:e89ba455dbcf 109
dflet 0:e89ba455dbcf 110 #if defined (SL_INC_NVMEM_PKG)
dflet 0:e89ba455dbcf 111 #define __nvm 1
dflet 0:e89ba455dbcf 112 #else
dflet 0:e89ba455dbcf 113 #define __nvm 0
dflet 0:e89ba455dbcf 114 #endif
dflet 0:e89ba455dbcf 115
dflet 0:e89ba455dbcf 116 #if defined (SL_INC_SOCKET_PKG)
dflet 0:e89ba455dbcf 117 #define __sck 1
dflet 0:e89ba455dbcf 118 #else
dflet 0:e89ba455dbcf 119 #define __sck 0
dflet 0:e89ba455dbcf 120 #endif
dflet 0:e89ba455dbcf 121
dflet 0:e89ba455dbcf 122 #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_EXT_API)
dflet 0:e89ba455dbcf 123 #define __sck__ext 1
dflet 0:e89ba455dbcf 124 #else
dflet 0:e89ba455dbcf 125 #define __sck__ext 0
dflet 0:e89ba455dbcf 126 #endif
dflet 0:e89ba455dbcf 127
dflet 0:e89ba455dbcf 128 #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_SERVER_SIDE_API)
dflet 0:e89ba455dbcf 129 #define __sck__srv 1
dflet 0:e89ba455dbcf 130 #else
dflet 0:e89ba455dbcf 131 #define __sck__srv 0
dflet 0:e89ba455dbcf 132 #endif
dflet 0:e89ba455dbcf 133
dflet 0:e89ba455dbcf 134 #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_CLIENT_SIDE_API)
dflet 0:e89ba455dbcf 135 #define __sck__clt 1
dflet 0:e89ba455dbcf 136 #else
dflet 0:e89ba455dbcf 137 #define __sck__clt 0
dflet 0:e89ba455dbcf 138 #endif
dflet 0:e89ba455dbcf 139
dflet 0:e89ba455dbcf 140 #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_RECV_API)
dflet 0:e89ba455dbcf 141 #define __sck__rcv 1
dflet 0:e89ba455dbcf 142 #else
dflet 0:e89ba455dbcf 143 #define __sck__rcv 0
dflet 0:e89ba455dbcf 144 #endif
dflet 0:e89ba455dbcf 145
dflet 0:e89ba455dbcf 146 #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_SEND_API)
dflet 0:e89ba455dbcf 147 #define __sck__snd 1
dflet 0:e89ba455dbcf 148 #else
dflet 0:e89ba455dbcf 149 #define __sck__snd 0
dflet 0:e89ba455dbcf 150 #endif
dflet 0:e89ba455dbcf 151
dflet 0:e89ba455dbcf 152 #if defined (SL_INC_WLAN_PKG)
dflet 0:e89ba455dbcf 153 #define __wln 1
dflet 0:e89ba455dbcf 154 #else
dflet 0:e89ba455dbcf 155 #define __wln 0
dflet 0:e89ba455dbcf 156 #endif
dflet 0:e89ba455dbcf 157
dflet 0:e89ba455dbcf 158 #if defined (SL_INC_WLAN_PKG) && defined (SL_INC_EXT_API)
dflet 0:e89ba455dbcf 159 #define __wln__ext 1
dflet 0:e89ba455dbcf 160 #else
dflet 0:e89ba455dbcf 161 #define __wln__ext 0
dflet 0:e89ba455dbcf 162 #endif
dflet 0:e89ba455dbcf 163
dflet 0:e89ba455dbcf 164 /* The return 1 is the function need to be included in the output */
dflet 0:e89ba455dbcf 165 #define _SL_INCLUDE_FUNC(Name) (_SL_INC_##Name)
dflet 0:e89ba455dbcf 166
dflet 0:e89ba455dbcf 167 /* Driver */
dflet 0:e89ba455dbcf 168 #define _SL_INC_sl_NetAppStart __nap
dflet 0:e89ba455dbcf 169
dflet 0:e89ba455dbcf 170 #define _SL_INC_sl_NetAppStop __nap
dflet 0:e89ba455dbcf 171
dflet 0:e89ba455dbcf 172 #define _SL_INC_sl_NetAppDnsGetHostByName __nap__clt
dflet 0:e89ba455dbcf 173
dflet 0:e89ba455dbcf 174
dflet 0:e89ba455dbcf 175 #define _SL_INC_sl_NetAppDnsGetHostByService __nap__clt
dflet 0:e89ba455dbcf 176 #define _SL_INC_sl_NetAppMDNSRegisterService __nap__clt
dflet 0:e89ba455dbcf 177 #define _SL_INC_sl_NetAppMDNSUnRegisterService __nap__clt
dflet 0:e89ba455dbcf 178 #define _SL_INC_sl_NetAppMDNSRegisterUnregisterService __nap__clt
dflet 0:e89ba455dbcf 179 #define _SL_INC_sl_NetAppGetServiceList __nap__clt
dflet 0:e89ba455dbcf 180
dflet 0:e89ba455dbcf 181
dflet 0:e89ba455dbcf 182 #define _SL_INC_sl_DnsGetHostByAddr __nap__ext
dflet 0:e89ba455dbcf 183
dflet 0:e89ba455dbcf 184 #define _SL_INC_sl_NetAppPingStart __nap
dflet 0:e89ba455dbcf 185
dflet 0:e89ba455dbcf 186 #define _SL_INC_sl_NetAppPingReport __nap
dflet 0:e89ba455dbcf 187
dflet 0:e89ba455dbcf 188 /* FS */
dflet 0:e89ba455dbcf 189 #define _SL_INC_sl_FsOpen __nvm
dflet 0:e89ba455dbcf 190
dflet 0:e89ba455dbcf 191 #define _SL_INC_sl_FsClose __nvm
dflet 0:e89ba455dbcf 192
dflet 0:e89ba455dbcf 193 #define _SL_INC_sl_FsRead __nvm
dflet 0:e89ba455dbcf 194
dflet 0:e89ba455dbcf 195 #define _SL_INC_sl_FsWrite __nvm
dflet 0:e89ba455dbcf 196
dflet 0:e89ba455dbcf 197 #define _SL_INC_sl_FsGetInfo __nvm
dflet 0:e89ba455dbcf 198
dflet 0:e89ba455dbcf 199 #define _SL_INC_sl_FsDel __nvm
dflet 0:e89ba455dbcf 200
dflet 0:e89ba455dbcf 201 /* netcfg */
dflet 0:e89ba455dbcf 202 #define _SL_INC_sl_MacAdrrSet __ncg
dflet 0:e89ba455dbcf 203
dflet 0:e89ba455dbcf 204 #define _SL_INC_sl_MacAdrrGet __ncg
dflet 0:e89ba455dbcf 205
dflet 0:e89ba455dbcf 206 #define _SL_INC_sl_NetCfgGet __ncg
dflet 0:e89ba455dbcf 207
dflet 0:e89ba455dbcf 208 #define _SL_INC_sl_NetCfgSet __ncg
dflet 0:e89ba455dbcf 209
dflet 0:e89ba455dbcf 210 #define _SL_INC_sl_NetAppSet __nap
dflet 0:e89ba455dbcf 211
dflet 0:e89ba455dbcf 212 #define _SL_INC_sl_NetAppGet __nap
dflet 0:e89ba455dbcf 213
dflet 0:e89ba455dbcf 214 /* socket */
dflet 0:e89ba455dbcf 215 #define _SL_INC_sl_Socket __sck
dflet 0:e89ba455dbcf 216
dflet 0:e89ba455dbcf 217 #define _SL_INC_sl_Close __sck__ext
dflet 0:e89ba455dbcf 218
dflet 0:e89ba455dbcf 219 #define _SL_INC_sl_Accept __sck__srv
dflet 0:e89ba455dbcf 220
dflet 0:e89ba455dbcf 221 #define _SL_INC_sl_Bind __sck
dflet 0:e89ba455dbcf 222
dflet 0:e89ba455dbcf 223 #define _SL_INC_sl_Listen __sck__srv
dflet 0:e89ba455dbcf 224
dflet 0:e89ba455dbcf 225 #define _SL_INC_sl_Connect __sck__clt
dflet 0:e89ba455dbcf 226
dflet 0:e89ba455dbcf 227 #define _SL_INC_sl_Select __sck
dflet 0:e89ba455dbcf 228
dflet 0:e89ba455dbcf 229 #define _SL_INC_sl_SetSockOpt __sck
dflet 0:e89ba455dbcf 230
dflet 0:e89ba455dbcf 231 #define _SL_INC_sl_GetSockOpt __sck__ext
dflet 0:e89ba455dbcf 232
dflet 0:e89ba455dbcf 233 #define _SL_INC_sl_Recv __sck__rcv
dflet 0:e89ba455dbcf 234
dflet 0:e89ba455dbcf 235 #define _SL_INC_sl_RecvFrom __sck__rcv
dflet 0:e89ba455dbcf 236
dflet 0:e89ba455dbcf 237 #define _SL_INC_sl_Write __sck__snd
dflet 0:e89ba455dbcf 238
dflet 0:e89ba455dbcf 239 #define _SL_INC_sl_Send __sck__snd
dflet 0:e89ba455dbcf 240
dflet 0:e89ba455dbcf 241 #define _SL_INC_sl_SendTo __sck__snd
dflet 0:e89ba455dbcf 242
dflet 0:e89ba455dbcf 243 #define _SL_INC_sl_Htonl __sck
dflet 0:e89ba455dbcf 244
dflet 0:e89ba455dbcf 245 #define _SL_INC_sl_Htons __sck
dflet 0:e89ba455dbcf 246
dflet 0:e89ba455dbcf 247 /* wlan */
dflet 0:e89ba455dbcf 248 #define _SL_INC_sl_WlanConnect __wln__ext
dflet 0:e89ba455dbcf 249
dflet 0:e89ba455dbcf 250 #define _SL_INC_sl_WlanDisconnect __wln__ext
dflet 0:e89ba455dbcf 251
dflet 0:e89ba455dbcf 252 #define _SL_INC_sl_WlanProfileAdd __wln__ext
dflet 0:e89ba455dbcf 253
dflet 0:e89ba455dbcf 254 #define _SL_INC_sl_WlanProfileGet __wln__ext
dflet 0:e89ba455dbcf 255
dflet 0:e89ba455dbcf 256 #define _SL_INC_sl_WlanProfileDel __wln__ext
dflet 0:e89ba455dbcf 257
dflet 0:e89ba455dbcf 258 #define _SL_INC_sl_WlanPolicySet __wln__ext
dflet 0:e89ba455dbcf 259
dflet 0:e89ba455dbcf 260 #define _SL_INC_sl_WlanPolicyGet __wln__ext
dflet 0:e89ba455dbcf 261
dflet 0:e89ba455dbcf 262 #define _SL_INC_sl_WlanGetNetworkList __wln__ext
dflet 0:e89ba455dbcf 263
dflet 0:e89ba455dbcf 264 #define _SL_INC_sl_WlanRxFilterAdd __wln__ext
dflet 0:e89ba455dbcf 265
dflet 0:e89ba455dbcf 266 #define _SL_INC_sl_WlanRxFilterSet __wln__ext
dflet 0:e89ba455dbcf 267
dflet 0:e89ba455dbcf 268 #define _SL_INC_sl_WlanRxFilterGet __wln__ext
dflet 0:e89ba455dbcf 269
dflet 0:e89ba455dbcf 270 #define _SL_INC_sl_SmartConfigStart __wln
dflet 0:e89ba455dbcf 271
dflet 0:e89ba455dbcf 272 #define _SL_INC_sl_SmartConfigOptSet __wln__ext
dflet 0:e89ba455dbcf 273
dflet 0:e89ba455dbcf 274
dflet 0:e89ba455dbcf 275 #define _SL_INC_sl_WlanSmartConfigStart __wln
dflet 0:e89ba455dbcf 276
dflet 0:e89ba455dbcf 277 #define _SL_INC_sl_WlanSmartConfigStop __wln
dflet 0:e89ba455dbcf 278
dflet 0:e89ba455dbcf 279 #define _SL_INC_sl_WlanSetMode __wln
dflet 0:e89ba455dbcf 280
dflet 0:e89ba455dbcf 281 #define _SL_INC_sl_WlanSet __wln
dflet 0:e89ba455dbcf 282
dflet 0:e89ba455dbcf 283 #define _SL_INC_sl_WlanGet __wln
dflet 0:e89ba455dbcf 284
dflet 0:e89ba455dbcf 285 #define _SL_INC_sl_SmartConfigOptSet __wln__ext
dflet 0:e89ba455dbcf 286
dflet 0:e89ba455dbcf 287 #define _SL_INC_sl_SmartConfigOptGet __wln__ext
dflet 0:e89ba455dbcf 288
dflet 0:e89ba455dbcf 289 #define _SL_INC_sl_WlanRxStatStart __wln__ext
dflet 0:e89ba455dbcf 290
dflet 0:e89ba455dbcf 291 #define _SL_INC_sl_WlanRxStatStop __wln__ext
dflet 0:e89ba455dbcf 292
dflet 0:e89ba455dbcf 293 #define _SL_INC_sl_WlanRxStatGet __wln__ext
dflet 0:e89ba455dbcf 294
dflet 0:e89ba455dbcf 295
dflet 0:e89ba455dbcf 296 /* device */
dflet 0:e89ba455dbcf 297 #define _SL_INC_sl_Task __int__spwn
dflet 0:e89ba455dbcf 298
dflet 0:e89ba455dbcf 299 #define _SL_INC_sl_Start __dev
dflet 0:e89ba455dbcf 300
dflet 0:e89ba455dbcf 301 #define _SL_INC_sl_Stop __dev
dflet 0:e89ba455dbcf 302
dflet 0:e89ba455dbcf 303 #define _SL_INC_sl_StatusGet __dev
dflet 0:e89ba455dbcf 304
dflet 0:e89ba455dbcf 305 #ifdef SL_IF_TYPE_UART
dflet 0:e89ba455dbcf 306 #define _SL_INC_sl_UartSetMode __dev
dflet 0:e89ba455dbcf 307 #endif
dflet 0:e89ba455dbcf 308
dflet 0:e89ba455dbcf 309 #define _SL_INC_sl_EventMaskGet __dev__ext
dflet 0:e89ba455dbcf 310
dflet 0:e89ba455dbcf 311 #define _SL_INC_sl_EventMaskSet __dev__ext
dflet 0:e89ba455dbcf 312
dflet 0:e89ba455dbcf 313 #define _SL_INC_sl_DevGet __dev__ext
dflet 0:e89ba455dbcf 314
dflet 0:e89ba455dbcf 315 #define _SL_INC_sl_DevSet __dev__ext
dflet 0:e89ba455dbcf 316
dflet 0:e89ba455dbcf 317 #endif /*OBJINCLUSION_H_ */
dflet 0:e89ba455dbcf 318