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