Updated to use external spawn.

Fork of simplelink_V2 by David Fletcher

Committer:
dflet
Date:
Sat Jun 06 13:48:29 2015 +0000
Revision:
1:9b68e650b3f6
Parent:
0:1a07906111ec
Oppps

Who changed what in which revision?

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