objInclusion.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. /*
  2. * objInclusion.h - CC31xx/CC32xx Host Driver Implementation
  3. *
  4. * Copyright (C) 2014 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. #include <simplelink.h>
  37. #ifndef OBJINCLUSION_H_
  38. #define OBJINCLUSION_H_
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /******************************************************************************
  43. For future use
  44. *******************************************************************************/
  45. #define __inln /* if inline functions requiered: #define __inln inline */
  46. #define SL_DEVICE /* Device silo is currently always mandatory */
  47. /******************************************************************************
  48. Qualifiers for package customizations
  49. *******************************************************************************/
  50. #if defined (SL_DEVICE)
  51. #define __dev 1
  52. #else
  53. #define __dev 0
  54. #endif
  55. #if defined (SL_DEVICE) && defined (SL_INC_EXT_API)
  56. #define __dev__ext 1
  57. #else
  58. #define __dev__ext 0
  59. #endif
  60. #if (!defined (SL_PLATFORM_MULTI_THREADED)) || (!defined (SL_PLATFORM_EXTERNAL_SPAWN))
  61. #define __int__spwn 1
  62. #else
  63. #define __int__spwn 0
  64. #endif
  65. #if defined (SL_INC_NET_APP_PKG)
  66. #define __nap 1
  67. #else
  68. #define __nap 0
  69. #endif
  70. #if defined (SL_INC_NET_APP_PKG) && defined (SL_INC_SOCK_CLIENT_SIDE_API)
  71. #define __nap__clt 1
  72. #else
  73. #define __nap__clt 0
  74. #endif
  75. #if defined (SL_INC_NET_APP_PKG) && defined (SL_INC_EXT_API)
  76. #define __nap__ext 1
  77. #else
  78. #define __nap__ext 0
  79. #endif
  80. #if defined (SL_INC_NET_CFG_PKG)
  81. #define __ncg 1
  82. #else
  83. #define __ncg 0
  84. #endif
  85. #if defined (SL_INC_NET_CFG_PKG) && defined (SL_INC_EXT_API)
  86. #define __ncg__ext 1
  87. #else
  88. #define __ncg__ext 0
  89. #endif
  90. #if defined (SL_INC_NVMEM_PKG)
  91. #define __nvm 1
  92. #else
  93. #define __nvm 0
  94. #endif
  95. #if defined (SL_INC_SOCKET_PKG)
  96. #define __sck 1
  97. #else
  98. #define __sck 0
  99. #endif
  100. #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_EXT_API)
  101. #define __sck__ext 1
  102. #else
  103. #define __sck__ext 0
  104. #endif
  105. #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_SERVER_SIDE_API)
  106. #define __sck__srv 1
  107. #else
  108. #define __sck__srv 0
  109. #endif
  110. #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_CLIENT_SIDE_API)
  111. #define __sck__clt 1
  112. #else
  113. #define __sck__clt 0
  114. #endif
  115. #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_RECV_API)
  116. #define __sck__rcv 1
  117. #else
  118. #define __sck__rcv 0
  119. #endif
  120. #if defined (SL_INC_SOCKET_PKG) && defined (SL_INC_SOCK_SEND_API)
  121. #define __sck__snd 1
  122. #else
  123. #define __sck__snd 0
  124. #endif
  125. #if defined (SL_INC_WLAN_PKG)
  126. #define __wln 1
  127. #else
  128. #define __wln 0
  129. #endif
  130. #if defined (SL_INC_WLAN_PKG) && defined (SL_INC_EXT_API)
  131. #define __wln__ext 1
  132. #else
  133. #define __wln__ext 0
  134. #endif
  135. /* The return 1 is the function need to be included in the output */
  136. #define _SL_INCLUDE_FUNC(Name) (_SL_INC_##Name)
  137. /* Driver */
  138. #define _SL_INC_sl_NetAppStart __nap__ext
  139. #define _SL_INC_sl_NetAppStop __nap__ext
  140. #define _SL_INC_sl_NetAppDnsGetHostByName __nap__clt
  141. #define _SL_INC_sl_NetAppDnsGetHostByService __nap__ext
  142. #define _SL_INC_sl_NetAppMDNSRegisterService __nap__ext
  143. #define _SL_INC_sl_NetAppMDNSUnRegisterService __nap__ext
  144. #define _SL_INC_sl_NetAppMDNSRegisterUnregisterService __nap__ext
  145. #define _SL_INC_sl_NetAppGetServiceList __nap__ext
  146. #define _SL_INC_sl_DnsGetHostByAddr __nap__ext
  147. #define _SL_INC_sl_NetAppPingStart __nap__ext
  148. #define _SL_INC_sl_NetAppPingReport __nap__ext
  149. #define _SL_INC_sl_NetAppSet __nap__ext
  150. #define _SL_INC_sl_NetAppGet __nap__ext
  151. /* FS */
  152. #define _SL_INC_sl_FsOpen __nvm
  153. #define _SL_INC_sl_FsClose __nvm
  154. #define _SL_INC_sl_FsRead __nvm
  155. #define _SL_INC_sl_FsWrite __nvm
  156. #define _SL_INC_sl_FsGetInfo __nvm
  157. #define _SL_INC_sl_FsDel __nvm
  158. /* netcfg */
  159. #define _SL_INC_sl_MacAdrrSet __ncg
  160. #define _SL_INC_sl_MacAdrrGet __ncg
  161. #define _SL_INC_sl_NetCfgGet __ncg
  162. #define _SL_INC_sl_NetCfgSet __ncg
  163. /* socket */
  164. #define _SL_INC_sl_Socket __sck
  165. #define _SL_INC_sl_Close __sck
  166. #define _SL_INC_sl_Accept __sck__srv
  167. #define _SL_INC_sl_Bind __sck
  168. #define _SL_INC_sl_Listen __sck__srv
  169. #define _SL_INC_sl_Connect __sck__clt
  170. #define _SL_INC_sl_Select __sck
  171. #define _SL_INC_sl_SetSockOpt __sck
  172. #define _SL_INC_sl_GetSockOpt __sck__ext
  173. #define _SL_INC_sl_Recv __sck__rcv
  174. #define _SL_INC_sl_RecvFrom __sck__rcv
  175. #define _SL_INC_sl_Write __sck__snd
  176. #define _SL_INC_sl_Send __sck__snd
  177. #define _SL_INC_sl_SendTo __sck__snd
  178. #define _SL_INC_sl_Htonl __sck
  179. #define _SL_INC_sl_Htons __sck
  180. /* wlan */
  181. #define _SL_INC_sl_WlanConnect __wln__ext
  182. #define _SL_INC_sl_WlanDisconnect __wln__ext
  183. #define _SL_INC_sl_WlanProfileAdd __wln__ext
  184. #define _SL_INC_sl_WlanProfileGet __wln__ext
  185. #define _SL_INC_sl_WlanProfileDel __wln__ext
  186. #define _SL_INC_sl_WlanPolicySet __wln__ext
  187. #define _SL_INC_sl_WlanPolicyGet __wln__ext
  188. #define _SL_INC_sl_WlanGetNetworkList __wln__ext
  189. #define _SL_INC_sl_WlanRxFilterAdd __wln__ext
  190. #define _SL_INC_sl_WlanRxFilterSet __wln__ext
  191. #define _SL_INC_sl_WlanRxFilterGet __wln__ext
  192. #define _SL_INC_sl_SmartConfigStart __wln
  193. #define _SL_INC_sl_SmartConfigOptSet __wln__ext
  194. #define _SL_INC_sl_WlanSmartConfigStart __wln
  195. #define _SL_INC_sl_WlanSmartConfigStop __wln
  196. #define _SL_INC_sl_WlanSetMode __wln
  197. #define _SL_INC_sl_WlanSet __wln
  198. #define _SL_INC_sl_WlanGet __wln
  199. #define _SL_INC_sl_SmartConfigOptSet __wln__ext
  200. #define _SL_INC_sl_SmartConfigOptGet __wln__ext
  201. #define _SL_INC_sl_WlanRxStatStart __wln__ext
  202. #define _SL_INC_sl_WlanRxStatStop __wln__ext
  203. #define _SL_INC_sl_WlanRxStatGet __wln__ext
  204. /* device */
  205. #define _SL_INC_sl_Task __int__spwn
  206. #define _SL_INC_sl_Start __dev
  207. #define _SL_INC_sl_Stop __dev
  208. #define _SL_INC_sl_StatusGet __dev
  209. #ifdef SL_IF_TYPE_UART
  210. #define _SL_INC_sl_UartSetMode __dev__ext
  211. #endif
  212. #define _SL_INC_sl_EventMaskGet __dev__ext
  213. #define _SL_INC_sl_EventMaskSet __dev__ext
  214. #define _SL_INC_sl_DevGet __dev__ext
  215. #define _SL_INC_sl_DevSet __dev__ext
  216. #ifdef __cplusplus
  217. }
  218. #endif /* __cplusplus */
  219. #endif /*OBJINCLUSION_H_ */