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:
19:3dd3e7f30f8b
Removed some debug.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:50cedd586816 1 /*
dflet 0:50cedd586816 2 * driver.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
dflet 0:50cedd586816 37 #ifndef DRIVER_INT_H_
dflet 0:50cedd586816 38 #define DRIVER_INT_H_
dflet 0:50cedd586816 39
dflet 0:50cedd586816 40 #include "mbed.h"
dflet 0:50cedd586816 41 #include "cc3100_simplelink.h"
dflet 19:3dd3e7f30f8b 42 #include "cc3100_user.h"
dflet 0:50cedd586816 43
dflet 0:50cedd586816 44 #include "cc3100_protocol.h"
dflet 0:50cedd586816 45 #include "cc3100_spi.h"
dflet 0:50cedd586816 46 //#include "cc3100_nonos.h"
dflet 0:50cedd586816 47 #include "cc3100_netapp.h"
dflet 0:50cedd586816 48 //#include "cc3100.h"
dflet 0:50cedd586816 49
dflet 19:3dd3e7f30f8b 50 //#ifdef SL_PLATFORM_MULTI_THREADED
dflet 19:3dd3e7f30f8b 51 #if (defined (SL_PLATFORM_MULTI_THREADED)) || (defined (SL_PLATFORM_EXTERNAL_SPAWN))
dflet 0:50cedd586816 52 #include "osi.h"
dflet 0:50cedd586816 53 #endif
dflet 0:50cedd586816 54
dflet 0:50cedd586816 55 /*****************************************************************************/
dflet 0:50cedd586816 56 /* Macro declarations */
dflet 0:50cedd586816 57 /*****************************************************************************/
dflet 0:50cedd586816 58
dflet 0:50cedd586816 59 /* 2 LSB of the N2H_SYNC_PATTERN are for sequence number
dflet 0:50cedd586816 60 only in SPI interface
dflet 0:50cedd586816 61 support backward sync pattern */
dflet 0:50cedd586816 62 #define N2H_SYNC_PATTERN_SEQ_NUM_BITS ((uint32_t)0x00000003) /* Bits 0..1 - use the 2 LBS for seq num */
dflet 0:50cedd586816 63 #define N2H_SYNC_PATTERN_SEQ_NUM_EXISTS ((uint32_t)0x00000004) /* Bit 2 - sign that sequence number exists in the sync pattern */
dflet 0:50cedd586816 64 #define N2H_SYNC_PATTERN_MASK ((uint32_t)0xFFFFFFF8) /* Bits 3..31 - constant SYNC PATTERN */
dflet 0:50cedd586816 65 #define N2H_SYNC_SPI_BUGS_MASK ((uint32_t)0x7FFF7F7F) /* Bits 7,15,31 - ignore the SPI (8,16,32 bites bus) error bits */
dflet 0:50cedd586816 66 #define BUF_SYNC_SPIM(pBuf) ((*(uint32_t *)(pBuf)) & N2H_SYNC_SPI_BUGS_MASK)
dflet 0:50cedd586816 67 #define N2H_SYNC_SPIM (N2H_SYNC_PATTERN & N2H_SYNC_SPI_BUGS_MASK)
dflet 0:50cedd586816 68 #define N2H_SYNC_SPIM_WITH_SEQ(TxSeqNum) ((N2H_SYNC_SPIM & N2H_SYNC_PATTERN_MASK) | N2H_SYNC_PATTERN_SEQ_NUM_EXISTS | ((TxSeqNum) & (N2H_SYNC_PATTERN_SEQ_NUM_BITS)))
dflet 0:50cedd586816 69 #define MATCH_WOUT_SEQ_NUM(pBuf) ( BUF_SYNC_SPIM(pBuf) == N2H_SYNC_SPIM )
dflet 0:50cedd586816 70 #define MATCH_WITH_SEQ_NUM(pBuf, TxSeqNum) ( BUF_SYNC_SPIM(pBuf) == (N2H_SYNC_SPIM_WITH_SEQ(TxSeqNum)) )
dflet 0:50cedd586816 71 #define N2H_SYNC_PATTERN_MATCH(pBuf, TxSeqNum) \
dflet 0:50cedd586816 72 ( \
dflet 0:50cedd586816 73 ( (*((uint32_t *)pBuf) & N2H_SYNC_PATTERN_SEQ_NUM_EXISTS) && ( MATCH_WITH_SEQ_NUM(pBuf, TxSeqNum) ) ) || \
dflet 0:50cedd586816 74 ( !(*((uint32_t *)pBuf) & N2H_SYNC_PATTERN_SEQ_NUM_EXISTS) && ( MATCH_WOUT_SEQ_NUM(pBuf ) ) ) \
dflet 0:50cedd586816 75 )
dflet 0:50cedd586816 76
dflet 0:50cedd586816 77 #define OPCODE(_ptr) (((_SlResponseHeader_t *)(_ptr))->GenHeader.Opcode)
dflet 0:50cedd586816 78 #define RSP_PAYLOAD_LEN(_ptr) (((_SlResponseHeader_t *)(_ptr))->GenHeader.Len - _SL_RESP_SPEC_HDR_SIZE)
dflet 0:50cedd586816 79 #define SD(_ptr) (((_SocketAddrResponse_u *)(_ptr))->IpV4.sd)
dflet 0:50cedd586816 80 /* Actual size of Recv/Recvfrom response data */
dflet 0:50cedd586816 81 #define ACT_DATA_SIZE(_ptr) (((_SocketAddrResponse_u *)(_ptr))->IpV4.statusOrLen)
dflet 0:50cedd586816 82
dflet 0:50cedd586816 83 #define _SL_PROTOCOL_ALIGN_SIZE(msgLen) (((msgLen)+3) & (~3))
dflet 0:50cedd586816 84 #define _SL_IS_PROTOCOL_ALIGNED_SIZE(msgLen) (!((msgLen) & 3))
dflet 0:50cedd586816 85 #define _SL_PROTOCOL_CALC_LEN(pCmdCtrl,pCmdExt) ((pCmdExt) ? \
dflet 0:50cedd586816 86 (_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen) + _SL_PROTOCOL_ALIGN_SIZE(pCmdExt->TxPayloadLen)) : \
dflet 0:50cedd586816 87 (_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen)))
dflet 0:50cedd586816 88
dflet 0:50cedd586816 89
dflet 0:50cedd586816 90 namespace mbed_cc3100 {
dflet 0:50cedd586816 91
dflet 0:50cedd586816 92 //class cc3100;
dflet 0:50cedd586816 93
dflet 0:50cedd586816 94 /*****************************************************************************/
dflet 0:50cedd586816 95 /* Structure/Enum declarations */
dflet 0:50cedd586816 96 /*****************************************************************************/
dflet 0:50cedd586816 97 //typedef void(*_SlSpawnEntryFunc_t)(void* pValue);
dflet 0:50cedd586816 98
dflet 0:50cedd586816 99 typedef struct {
dflet 0:50cedd586816 100 _SlOpcode_t Opcode;
dflet 0:50cedd586816 101 _SlArgSize_t TxDescLen;
dflet 0:50cedd586816 102 _SlArgSize_t RxDescLen;
dflet 0:50cedd586816 103 } _SlCmdCtrl_t;
dflet 0:50cedd586816 104
dflet 0:50cedd586816 105 typedef struct {
dflet 0:50cedd586816 106 uint16_t TxPayloadLen;
dflet 0:50cedd586816 107 int16_t RxPayloadLen;
dflet 0:50cedd586816 108 int16_t ActualRxPayloadLen;
dflet 0:50cedd586816 109 uint8_t *pTxPayload;
dflet 0:50cedd586816 110 uint8_t *pRxPayload;
dflet 0:50cedd586816 111 } _SlCmdExt_t;
dflet 0:50cedd586816 112
dflet 0:50cedd586816 113
dflet 0:50cedd586816 114 typedef struct _SlArgsData_t {
dflet 0:50cedd586816 115 uint8_t *pArgs;
dflet 0:50cedd586816 116 uint8_t *pData;
dflet 0:50cedd586816 117 } _SlArgsData_t;
dflet 0:50cedd586816 118
dflet 19:3dd3e7f30f8b 119 typedef struct {
dflet 19:3dd3e7f30f8b 120 _SlSyncObj_t SyncObj;
dflet 0:50cedd586816 121 uint8_t *pRespArgs;
dflet 0:50cedd586816 122 uint8_t ActionID;
dflet 0:50cedd586816 123 uint8_t AdditionalData; /* use for socketID and one bit which indicate supprt IPV6 or not (1=support, 0 otherwise) */
dflet 0:50cedd586816 124 uint8_t NextIndex;
dflet 0:50cedd586816 125
dflet 0:50cedd586816 126 } _SlPoolObj_t;
dflet 0:50cedd586816 127
dflet 0:50cedd586816 128
dflet 0:50cedd586816 129 typedef enum {
dflet 0:50cedd586816 130 SOCKET_0,
dflet 0:50cedd586816 131 SOCKET_1,
dflet 0:50cedd586816 132 SOCKET_2,
dflet 0:50cedd586816 133 SOCKET_3,
dflet 0:50cedd586816 134 SOCKET_4,
dflet 0:50cedd586816 135 SOCKET_5,
dflet 0:50cedd586816 136 SOCKET_6,
dflet 0:50cedd586816 137 SOCKET_7,
dflet 0:50cedd586816 138 MAX_SOCKET_ENUM_IDX,
dflet 0:50cedd586816 139 #ifndef SL_TINY_EXT
dflet 0:50cedd586816 140 ACCEPT_ID = MAX_SOCKET_ENUM_IDX,
dflet 0:50cedd586816 141 CONNECT_ID,
dflet 0:50cedd586816 142 #else
dflet 0:50cedd586816 143 CONNECT_ID = MAX_SOCKET_ENUM_IDX,
dflet 0:50cedd586816 144 #endif
dflet 0:50cedd586816 145 #ifndef SL_TINY_EXT
dflet 0:50cedd586816 146 SELECT_ID,
dflet 0:50cedd586816 147 #endif
dflet 0:50cedd586816 148 GETHOSYBYNAME_ID,
dflet 0:50cedd586816 149 #ifndef SL_TINY_EXT
dflet 0:50cedd586816 150 GETHOSYBYSERVICE_ID,
dflet 0:50cedd586816 151 PING_ID,
dflet 0:50cedd586816 152 #endif
dflet 0:50cedd586816 153 START_STOP_ID,
dflet 0:50cedd586816 154 RECV_ID
dflet 0:50cedd586816 155 } _SlActionID_e;
dflet 0:50cedd586816 156
dflet 0:50cedd586816 157 typedef struct _SlActionLookup_t {
dflet 0:50cedd586816 158 uint8_t ActionID;
dflet 0:50cedd586816 159 uint16_t ActionAsyncOpcode;
dflet 0:50cedd586816 160 _SlSpawnEntryFunc_t AsyncEventHandler;
dflet 0:50cedd586816 161
dflet 0:50cedd586816 162 } _SlActionLookup_t;
dflet 0:50cedd586816 163
dflet 0:50cedd586816 164
dflet 0:50cedd586816 165 typedef struct {
dflet 19:3dd3e7f30f8b 166 uint8_t TxPoolCnt;
dflet 0:50cedd586816 167 _SlLockObj_t TxLockObj;
dflet 0:50cedd586816 168 _SlSyncObj_t TxSyncObj;
dflet 0:50cedd586816 169 } _SlFlowContCB_t;
dflet 0:50cedd586816 170
dflet 0:50cedd586816 171 typedef enum {
dflet 0:50cedd586816 172 RECV_RESP_CLASS,
dflet 0:50cedd586816 173 CMD_RESP_CLASS,
dflet 0:50cedd586816 174 ASYNC_EVT_CLASS,
dflet 0:50cedd586816 175 DUMMY_MSG_CLASS
dflet 0:50cedd586816 176 } _SlRxMsgClass_e;
dflet 0:50cedd586816 177
dflet 0:50cedd586816 178 typedef struct {
dflet 0:50cedd586816 179 uint8_t *pAsyncBuf; /* place to write pointer to buffer with CmdResp's Header + Arguments */
dflet 0:50cedd586816 180 uint8_t ActionIndex;
dflet 0:50cedd586816 181 _SlSpawnEntryFunc_t AsyncEvtHandler; /* place to write pointer to AsyncEvent handler (calc-ed by Opcode) */
dflet 0:50cedd586816 182 _SlRxMsgClass_e RxMsgClass; /* type of Rx message */
dflet 0:50cedd586816 183 } AsyncExt_t;
dflet 0:50cedd586816 184
dflet 0:50cedd586816 185 typedef struct {
dflet 0:50cedd586816 186 _SlCmdCtrl_t *pCmdCtrl;
dflet 0:50cedd586816 187 uint8_t *pTxRxDescBuff;
dflet 0:50cedd586816 188 _SlCmdExt_t *pCmdExt;
dflet 0:50cedd586816 189 AsyncExt_t AsyncExt;
dflet 0:50cedd586816 190 } _SlFunctionParams_t;
dflet 0:50cedd586816 191
dflet 0:50cedd586816 192 typedef void (*P_INIT_CALLBACK)(uint32_t Status);
dflet 0:50cedd586816 193
dflet 0:50cedd586816 194 typedef struct {
dflet 0:50cedd586816 195 _SlFd_t FD;
dflet 0:50cedd586816 196 _SlLockObj_t GlobalLockObj;
dflet 0:50cedd586816 197 _SlCommandHeader_t TempProtocolHeader;
dflet 0:50cedd586816 198 P_INIT_CALLBACK pInitCallback;
dflet 0:50cedd586816 199
dflet 0:50cedd586816 200 _SlPoolObj_t ObjPool[MAX_CONCURRENT_ACTIONS];
dflet 0:50cedd586816 201 uint8_t FreePoolIdx;
dflet 0:50cedd586816 202 uint8_t PendingPoolIdx;
dflet 0:50cedd586816 203 uint8_t ActivePoolIdx;
dflet 0:50cedd586816 204 uint32_t ActiveActionsBitmap;
dflet 0:50cedd586816 205 _SlLockObj_t ProtectionLockObj;
dflet 0:50cedd586816 206
dflet 0:50cedd586816 207 _SlSyncObj_t CmdSyncObj;
dflet 0:50cedd586816 208 uint8_t IsCmdRespWaited;
dflet 0:50cedd586816 209 _SlFlowContCB_t FlowContCB;
dflet 0:50cedd586816 210 uint8_t TxSeqNum;
dflet 0:50cedd586816 211 uint8_t RxDoneCnt;
dflet 0:50cedd586816 212 uint8_t SocketNonBlocking;
dflet 0:50cedd586816 213 uint8_t SocketTXFailure;
dflet 0:50cedd586816 214 /* for stack reduction the parameters are globals */
dflet 0:50cedd586816 215 _SlFunctionParams_t FunctionParams;
dflet 0:50cedd586816 216
dflet 0:50cedd586816 217 uint8_t ActionIndex;
dflet 0:50cedd586816 218 }_SlDriverCb_t;
dflet 0:50cedd586816 219
dflet 0:50cedd586816 220 extern volatile uint8_t RxIrqCnt;
dflet 0:50cedd586816 221
dflet 0:50cedd586816 222 extern _SlDriverCb_t* g_pCB;
dflet 0:50cedd586816 223 typedef uint8_t _SlSd_t;
dflet 0:50cedd586816 224
dflet 0:50cedd586816 225 class cc3100_driver
dflet 0:50cedd586816 226 {
dflet 0:50cedd586816 227
dflet 0:50cedd586816 228 public:
dflet 0:50cedd586816 229
dflet 19:3dd3e7f30f8b 230 //#ifndef SL_PLATFORM_MULTI_THREADED
dflet 19:3dd3e7f30f8b 231 #if (!defined (SL_PLATFORM_MULTI_THREADED)) && (!defined (SL_PLATFORM_EXTERNAL_SPAWN))
dflet 0:50cedd586816 232 cc3100_driver(cc3100_spi &spi, cc3100_nonos &nonos, cc3100_netapp &netapp, cc3100_flowcont &flowcont);
dflet 0:50cedd586816 233 #else
dflet 0:50cedd586816 234 cc3100_driver(cc3100_spi &spi, cc3100_netapp &netapp, cc3100_flowcont &flowcont);
dflet 0:50cedd586816 235 #endif
dflet 0:50cedd586816 236 ~cc3100_driver();
dflet 0:50cedd586816 237
dflet 0:50cedd586816 238
dflet 0:50cedd586816 239 /*****************************************************************************/
dflet 0:50cedd586816 240 /* Function prototypes */
dflet 0:50cedd586816 241 /*****************************************************************************/
dflet 0:50cedd586816 242 typedef _SlDriverCb_t pDriver;
dflet 0:50cedd586816 243
dflet 0:50cedd586816 244 uint8_t _SlDrvProtectAsyncRespSetting(uint8_t *pAsyncRsp, uint8_t ActionID, uint8_t SocketID);
dflet 0:50cedd586816 245
dflet 0:50cedd586816 246 bool _SL_PENDING_RX_MSG(pDriver* pDriverCB);
dflet 0:50cedd586816 247
dflet 0:50cedd586816 248 void _SlDrvDriverCBInit(void);
dflet 0:50cedd586816 249
dflet 0:50cedd586816 250 void _SlDrvDriverCBDeinit(void);
dflet 0:50cedd586816 251
dflet 0:50cedd586816 252 void _SlDrvRxIrqHandler(void *pValue);
dflet 0:50cedd586816 253
dflet 0:50cedd586816 254 _SlReturnVal_t _SlDrvCmdOp(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
dflet 0:50cedd586816 255
dflet 0:50cedd586816 256 _SlReturnVal_t _SlDrvCmdSend(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
dflet 0:50cedd586816 257
dflet 0:50cedd586816 258 _SlReturnVal_t _SlDrvDataReadOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
dflet 0:50cedd586816 259
dflet 0:50cedd586816 260 _SlReturnVal_t _SlDrvDataWriteOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt);
dflet 0:50cedd586816 261 #ifndef SL_TINY_EXT
dflet 0:50cedd586816 262 int16_t _SlDrvBasicCmd(_SlOpcode_t Opcode);
dflet 0:50cedd586816 263 #endif
dflet 0:50cedd586816 264 uint8_t _SlDrvWaitForPoolObj(uint8_t ActionID, uint8_t SocketID);
dflet 0:50cedd586816 265
dflet 0:50cedd586816 266 void _SlDrvReleasePoolObj(uint8_t pObj);
dflet 0:50cedd586816 267
dflet 0:50cedd586816 268 // void _SlDrvObjInit(void);
dflet 0:50cedd586816 269
dflet 0:50cedd586816 270 _SlReturnVal_t _SlDrvMsgRead(void);
dflet 0:50cedd586816 271
dflet 0:50cedd586816 272 _SlReturnVal_t _SlDrvMsgWrite(_SlCmdCtrl_t *pCmdCtrl,_SlCmdExt_t *pCmdExt, uint8_t *pTxRxDescBuff);
dflet 0:50cedd586816 273
dflet 0:50cedd586816 274 // _SlReturnVal_t _SlDrvMsgWrite(void);
dflet 0:50cedd586816 275
dflet 0:50cedd586816 276 _SlReturnVal_t _SlDrvMsgReadCmdCtx(void);
dflet 0:50cedd586816 277
dflet 0:50cedd586816 278 _SlReturnVal_t _SlDrvMsgReadSpawnCtx_(void *pValue);
dflet 0:50cedd586816 279
dflet 0:50cedd586816 280 void _SlDrvClassifyRxMsg(_SlOpcode_t Opcode );
dflet 0:50cedd586816 281
dflet 0:50cedd586816 282 _SlReturnVal_t _SlDrvRxHdrRead(uint8_t *pBuf, uint8_t *pAlignSize);
dflet 0:50cedd586816 283
dflet 0:50cedd586816 284 void _SlDrvShiftDWord(uint8_t *pBuf);
dflet 0:50cedd586816 285
dflet 0:50cedd586816 286 void _SlAsyncEventGenericHandler(void);
dflet 0:50cedd586816 287
dflet 0:50cedd586816 288 void _SlDrvObjDeInit(void);
dflet 0:50cedd586816 289
dflet 0:50cedd586816 290 void _SlRemoveFromList(uint8_t* ListIndex, uint8_t ItemIndex);
dflet 0:50cedd586816 291
dflet 0:50cedd586816 292 _SlReturnVal_t _SlFindAndSetActiveObj(_SlOpcode_t Opcode, uint8_t Sd);
dflet 0:50cedd586816 293
dflet 19:3dd3e7f30f8b 294 uint16_t _SlDrvAlignSize(uint16_t msgLen);
dflet 0:50cedd586816 295 void _SlDrvSyncObjWaitForever(_SlSyncObj_t *pSyncObj);
dflet 0:50cedd586816 296 void _SlDrvSyncObjSignal(_SlSyncObj_t *pSyncObj);
dflet 0:50cedd586816 297 void _SlDrvObjLock(_SlLockObj_t *pLockObj, _SlTime_t Timeout);
dflet 0:50cedd586816 298 void _SlDrvObjLockWaitForever(_SlLockObj_t *pLockObj);
dflet 19:3dd3e7f30f8b 299 void _SlDrvObjUnLock(_SlLockObj_t *pLockObj);
dflet 0:50cedd586816 300 void _SlDrvProtectionObjLockWaitForever();
dflet 0:50cedd586816 301 void _SlDrvProtectionObjUnLock();
dflet 0:50cedd586816 302 void _SlDrvMemZero(void* Addr, uint16_t size);
dflet 0:50cedd586816 303 void _SlDrvResetCmdExt(_SlCmdExt_t* pCmdExt);
dflet 0:50cedd586816 304
dflet 0:50cedd586816 305
dflet 0:50cedd586816 306 private:
dflet 0:50cedd586816 307
dflet 0:50cedd586816 308 cc3100_spi &_spi;
dflet 19:3dd3e7f30f8b 309 //#ifndef SL_PLATFORM_MULTI_THREADED
dflet 19:3dd3e7f30f8b 310 #if (!defined (SL_PLATFORM_MULTI_THREADED)) && (!defined (SL_PLATFORM_EXTERNAL_SPAWN))
dflet 0:50cedd586816 311 cc3100_nonos &_nonos;
dflet 0:50cedd586816 312 #endif
dflet 0:50cedd586816 313 cc3100_netapp &_netapp;
dflet 0:50cedd586816 314 cc3100_flowcont &_flowcont;
dflet 0:50cedd586816 315
dflet 0:50cedd586816 316 };//class
dflet 0:50cedd586816 317
dflet 0:50cedd586816 318
dflet 0:50cedd586816 319
dflet 0:50cedd586816 320 }//namespace mbed_cc3100
dflet 0:50cedd586816 321
dflet 0:50cedd586816 322 #endif /* __DRIVER_INT_H__ */
dflet 0:50cedd586816 323