Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.

Dependencies:   mbed

Committer:
dflet
Date:
Tue Sep 15 16:45:04 2015 +0000
Revision:
22:f9b5e0b80bf2
Parent:
0:50cedd586816
Removed some debug.

Who changed what in which revision?

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