TI's CC3100. A test demo with very little testing done!
Fork of cc3100_Test_Demo2 by
simplelink/cc3100_driver.h@0:e89ba455dbcf, 2015-02-10 (annotated)
- Committer:
- dflet
- Date:
- Tue Feb 10 12:09:29 2015 +0000
- Revision:
- 0:e89ba455dbcf
For test only! Not much has been tested, but the 2 demo apps run ok. Alot more work needs to be done!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:e89ba455dbcf | 1 | /* |
dflet | 0:e89ba455dbcf | 2 | * driver.h - CC31xx/CC32xx Host Driver Implementation |
dflet | 0:e89ba455dbcf | 3 | * |
dflet | 0:e89ba455dbcf | 4 | * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ |
dflet | 0:e89ba455dbcf | 5 | * |
dflet | 0:e89ba455dbcf | 6 | * |
dflet | 0:e89ba455dbcf | 7 | * Redistribution and use in source and binary forms, with or without |
dflet | 0:e89ba455dbcf | 8 | * modification, are permitted provided that the following conditions |
dflet | 0:e89ba455dbcf | 9 | * are met: |
dflet | 0:e89ba455dbcf | 10 | * |
dflet | 0:e89ba455dbcf | 11 | * Redistributions of source code must retain the above copyright |
dflet | 0:e89ba455dbcf | 12 | * notice, this list of conditions and the following disclaimer. |
dflet | 0:e89ba455dbcf | 13 | * |
dflet | 0:e89ba455dbcf | 14 | * Redistributions in binary form must reproduce the above copyright |
dflet | 0:e89ba455dbcf | 15 | * notice, this list of conditions and the following disclaimer in the |
dflet | 0:e89ba455dbcf | 16 | * documentation and/or other materials provided with the |
dflet | 0:e89ba455dbcf | 17 | * distribution. |
dflet | 0:e89ba455dbcf | 18 | * |
dflet | 0:e89ba455dbcf | 19 | * Neither the name of Texas Instruments Incorporated nor the names of |
dflet | 0:e89ba455dbcf | 20 | * its contributors may be used to endorse or promote products derived |
dflet | 0:e89ba455dbcf | 21 | * from this software without specific prior written permission. |
dflet | 0:e89ba455dbcf | 22 | * |
dflet | 0:e89ba455dbcf | 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
dflet | 0:e89ba455dbcf | 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
dflet | 0:e89ba455dbcf | 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
dflet | 0:e89ba455dbcf | 26 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
dflet | 0:e89ba455dbcf | 27 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
dflet | 0:e89ba455dbcf | 28 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
dflet | 0:e89ba455dbcf | 29 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
dflet | 0:e89ba455dbcf | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
dflet | 0:e89ba455dbcf | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
dflet | 0:e89ba455dbcf | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
dflet | 0:e89ba455dbcf | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dflet | 0:e89ba455dbcf | 34 | * |
dflet | 0:e89ba455dbcf | 35 | */ |
dflet | 0:e89ba455dbcf | 36 | |
dflet | 0:e89ba455dbcf | 37 | #ifndef DRIVER_INT_H_ |
dflet | 0:e89ba455dbcf | 38 | #define DRIVER_INT_H_ |
dflet | 0:e89ba455dbcf | 39 | |
dflet | 0:e89ba455dbcf | 40 | #include "cc3100_simplelink.h" |
dflet | 0:e89ba455dbcf | 41 | |
dflet | 0:e89ba455dbcf | 42 | #include "cc3100_protocol.h" |
dflet | 0:e89ba455dbcf | 43 | #include "cc3100_nonos.h" |
dflet | 0:e89ba455dbcf | 44 | #include "cc3100_spi.h" |
dflet | 0:e89ba455dbcf | 45 | #include "cc3100_netapp.h" |
dflet | 0:e89ba455dbcf | 46 | #include "cc3100.h" |
dflet | 0:e89ba455dbcf | 47 | |
dflet | 0:e89ba455dbcf | 48 | |
dflet | 0:e89ba455dbcf | 49 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 50 | /* Macro declarations */ |
dflet | 0:e89ba455dbcf | 51 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 52 | |
dflet | 0:e89ba455dbcf | 53 | /* 2 LSB of the N2H_SYNC_PATTERN are for sequence number |
dflet | 0:e89ba455dbcf | 54 | only in SPI interface |
dflet | 0:e89ba455dbcf | 55 | support backward sync pattern */ |
dflet | 0:e89ba455dbcf | 56 | #define N2H_SYNC_PATTERN_SEQ_NUM_BITS ((uint32_t)0x00000003) /* Bits 0..1 - use the 2 LBS for seq num */ |
dflet | 0:e89ba455dbcf | 57 | #define N2H_SYNC_PATTERN_SEQ_NUM_EXISTS ((uint32_t)0x00000004) /* Bit 2 - sign that sequence number exists in the sync pattern */ |
dflet | 0:e89ba455dbcf | 58 | #define N2H_SYNC_PATTERN_MASK ((uint32_t)0xFFFFFFF8) /* Bits 3..31 - constant SYNC PATTERN */ |
dflet | 0:e89ba455dbcf | 59 | #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:e89ba455dbcf | 60 | #define BUF_SYNC_SPIM(pBuf) ((*(uint32_t *)(pBuf)) & N2H_SYNC_SPI_BUGS_MASK) |
dflet | 0:e89ba455dbcf | 61 | #define N2H_SYNC_SPIM (N2H_SYNC_PATTERN & N2H_SYNC_SPI_BUGS_MASK) |
dflet | 0:e89ba455dbcf | 62 | #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:e89ba455dbcf | 63 | #define MATCH_WOUT_SEQ_NUM(pBuf) ( BUF_SYNC_SPIM(pBuf) == N2H_SYNC_SPIM ) |
dflet | 0:e89ba455dbcf | 64 | #define MATCH_WITH_SEQ_NUM(pBuf, TxSeqNum) ( BUF_SYNC_SPIM(pBuf) == (N2H_SYNC_SPIM_WITH_SEQ(TxSeqNum)) ) |
dflet | 0:e89ba455dbcf | 65 | #define N2H_SYNC_PATTERN_MATCH(pBuf, TxSeqNum) \ |
dflet | 0:e89ba455dbcf | 66 | ( \ |
dflet | 0:e89ba455dbcf | 67 | ( (*((uint32_t *)pBuf) & N2H_SYNC_PATTERN_SEQ_NUM_EXISTS) && ( MATCH_WITH_SEQ_NUM(pBuf, TxSeqNum) ) ) || \ |
dflet | 0:e89ba455dbcf | 68 | ( !(*((uint32_t *)pBuf) & N2H_SYNC_PATTERN_SEQ_NUM_EXISTS) && ( MATCH_WOUT_SEQ_NUM(pBuf ) ) ) \ |
dflet | 0:e89ba455dbcf | 69 | ) |
dflet | 0:e89ba455dbcf | 70 | |
dflet | 0:e89ba455dbcf | 71 | #define OPCODE(_ptr) (((_SlResponseHeader_t *)(_ptr))->GenHeader.Opcode) |
dflet | 0:e89ba455dbcf | 72 | #define RSP_PAYLOAD_LEN(_ptr) (((_SlResponseHeader_t *)(_ptr))->GenHeader.Len - _SL_RESP_SPEC_HDR_SIZE) |
dflet | 0:e89ba455dbcf | 73 | #define SD(_ptr) (((_SocketAddrResponse_u *)(_ptr))->IpV4.sd) |
dflet | 0:e89ba455dbcf | 74 | /* Actual size of Recv/Recvfrom response data */ |
dflet | 0:e89ba455dbcf | 75 | #define ACT_DATA_SIZE(_ptr) (((_SocketAddrResponse_u *)(_ptr))->IpV4.statusOrLen) |
dflet | 0:e89ba455dbcf | 76 | |
dflet | 0:e89ba455dbcf | 77 | #define _SL_PROTOCOL_ALIGN_SIZE(msgLen) (((msgLen)+3) & (~3)) |
dflet | 0:e89ba455dbcf | 78 | #define _SL_IS_PROTOCOL_ALIGNED_SIZE(msgLen) (!((msgLen) & 3)) |
dflet | 0:e89ba455dbcf | 79 | #define _SL_PROTOCOL_CALC_LEN(pCmdCtrl,pCmdExt) ((pCmdExt) ? \ |
dflet | 0:e89ba455dbcf | 80 | (_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen) + _SL_PROTOCOL_ALIGN_SIZE(pCmdExt->TxPayloadLen)) : \ |
dflet | 0:e89ba455dbcf | 81 | (_SL_PROTOCOL_ALIGN_SIZE(pCmdCtrl->TxDescLen))) |
dflet | 0:e89ba455dbcf | 82 | |
dflet | 0:e89ba455dbcf | 83 | |
dflet | 0:e89ba455dbcf | 84 | namespace mbed_cc3100 { |
dflet | 0:e89ba455dbcf | 85 | |
dflet | 0:e89ba455dbcf | 86 | class cc3100; |
dflet | 0:e89ba455dbcf | 87 | |
dflet | 0:e89ba455dbcf | 88 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 89 | /* Structure/Enum declarations */ |
dflet | 0:e89ba455dbcf | 90 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 91 | //typedef void(*_SlSpawnEntryFunc_t)(void* pValue); |
dflet | 0:e89ba455dbcf | 92 | |
dflet | 0:e89ba455dbcf | 93 | typedef struct { |
dflet | 0:e89ba455dbcf | 94 | _SlOpcode_t Opcode; |
dflet | 0:e89ba455dbcf | 95 | _SlArgSize_t TxDescLen; |
dflet | 0:e89ba455dbcf | 96 | _SlArgSize_t RxDescLen; |
dflet | 0:e89ba455dbcf | 97 | } _SlCmdCtrl_t; |
dflet | 0:e89ba455dbcf | 98 | |
dflet | 0:e89ba455dbcf | 99 | typedef struct { |
dflet | 0:e89ba455dbcf | 100 | uint16_t TxPayloadLen; |
dflet | 0:e89ba455dbcf | 101 | uint16_t RxPayloadLen; |
dflet | 0:e89ba455dbcf | 102 | uint16_t ActualRxPayloadLen; |
dflet | 0:e89ba455dbcf | 103 | uint8_t *pTxPayload; |
dflet | 0:e89ba455dbcf | 104 | uint8_t *pRxPayload; |
dflet | 0:e89ba455dbcf | 105 | } _SlCmdExt_t; |
dflet | 0:e89ba455dbcf | 106 | |
dflet | 0:e89ba455dbcf | 107 | |
dflet | 0:e89ba455dbcf | 108 | typedef struct _SlArgsData_t { |
dflet | 0:e89ba455dbcf | 109 | uint8_t *pArgs; |
dflet | 0:e89ba455dbcf | 110 | uint8_t *pData; |
dflet | 0:e89ba455dbcf | 111 | } _SlArgsData_t; |
dflet | 0:e89ba455dbcf | 112 | |
dflet | 0:e89ba455dbcf | 113 | |
dflet | 0:e89ba455dbcf | 114 | typedef struct _SlPoolObj_t { |
dflet | 0:e89ba455dbcf | 115 | _SlSyncObj_t SyncObj; |
dflet | 0:e89ba455dbcf | 116 | uint8_t *pRespArgs; |
dflet | 0:e89ba455dbcf | 117 | uint8_t ActionID; |
dflet | 0:e89ba455dbcf | 118 | uint8_t AdditionalData; /* use for socketID and one bit which indicate supprt IPV6 or not (1=support, 0 otherwise) */ |
dflet | 0:e89ba455dbcf | 119 | uint8_t NextIndex; |
dflet | 0:e89ba455dbcf | 120 | |
dflet | 0:e89ba455dbcf | 121 | } _SlPoolObj_t; |
dflet | 0:e89ba455dbcf | 122 | |
dflet | 0:e89ba455dbcf | 123 | |
dflet | 0:e89ba455dbcf | 124 | typedef enum { |
dflet | 0:e89ba455dbcf | 125 | SOCKET_0, |
dflet | 0:e89ba455dbcf | 126 | SOCKET_1, |
dflet | 0:e89ba455dbcf | 127 | SOCKET_2, |
dflet | 0:e89ba455dbcf | 128 | SOCKET_3, |
dflet | 0:e89ba455dbcf | 129 | SOCKET_4, |
dflet | 0:e89ba455dbcf | 130 | SOCKET_5, |
dflet | 0:e89ba455dbcf | 131 | SOCKET_6, |
dflet | 0:e89ba455dbcf | 132 | SOCKET_7, |
dflet | 0:e89ba455dbcf | 133 | MAX_SOCKET_ENUM_IDX, |
dflet | 0:e89ba455dbcf | 134 | ACCEPT_ID = MAX_SOCKET_ENUM_IDX, |
dflet | 0:e89ba455dbcf | 135 | CONNECT_ID, |
dflet | 0:e89ba455dbcf | 136 | SELECT_ID, |
dflet | 0:e89ba455dbcf | 137 | GETHOSYBYNAME_ID, |
dflet | 0:e89ba455dbcf | 138 | GETHOSYBYSERVICE_ID, |
dflet | 0:e89ba455dbcf | 139 | PING_ID, |
dflet | 0:e89ba455dbcf | 140 | START_STOP_ID, |
dflet | 0:e89ba455dbcf | 141 | RECV_ID |
dflet | 0:e89ba455dbcf | 142 | } _SlActionID_e; |
dflet | 0:e89ba455dbcf | 143 | |
dflet | 0:e89ba455dbcf | 144 | typedef struct _SlActionLookup_t { |
dflet | 0:e89ba455dbcf | 145 | uint8_t ActionID; |
dflet | 0:e89ba455dbcf | 146 | uint16_t ActionAsyncOpcode; |
dflet | 0:e89ba455dbcf | 147 | _SlSpawnEntryFunc_t AsyncEventHandler; |
dflet | 0:e89ba455dbcf | 148 | |
dflet | 0:e89ba455dbcf | 149 | } _SlActionLookup_t; |
dflet | 0:e89ba455dbcf | 150 | |
dflet | 0:e89ba455dbcf | 151 | |
dflet | 0:e89ba455dbcf | 152 | typedef struct { |
dflet | 0:e89ba455dbcf | 153 | uint8_t TxPoolCnt; |
dflet | 0:e89ba455dbcf | 154 | _SlLockObj_t TxLockObj; |
dflet | 0:e89ba455dbcf | 155 | _SlSyncObj_t TxSyncObj; |
dflet | 0:e89ba455dbcf | 156 | } _SlFlowContCB_t; |
dflet | 0:e89ba455dbcf | 157 | |
dflet | 0:e89ba455dbcf | 158 | typedef enum { |
dflet | 0:e89ba455dbcf | 159 | RECV_RESP_CLASS, |
dflet | 0:e89ba455dbcf | 160 | CMD_RESP_CLASS, |
dflet | 0:e89ba455dbcf | 161 | ASYNC_EVT_CLASS, |
dflet | 0:e89ba455dbcf | 162 | DUMMY_MSG_CLASS |
dflet | 0:e89ba455dbcf | 163 | } _SlRxMsgClass_e; |
dflet | 0:e89ba455dbcf | 164 | |
dflet | 0:e89ba455dbcf | 165 | typedef struct { |
dflet | 0:e89ba455dbcf | 166 | uint8_t *pAsyncBuf; /* place to write pointer to buffer with CmdResp's Header + Arguments */ |
dflet | 0:e89ba455dbcf | 167 | uint8_t ActionIndex; |
dflet | 0:e89ba455dbcf | 168 | _SlSpawnEntryFunc_t AsyncEvtHandler; /* place to write pointer to AsyncEvent handler (calc-ed by Opcode) */ |
dflet | 0:e89ba455dbcf | 169 | _SlRxMsgClass_e RxMsgClass; /* type of Rx message */ |
dflet | 0:e89ba455dbcf | 170 | } AsyncExt_t; |
dflet | 0:e89ba455dbcf | 171 | |
dflet | 0:e89ba455dbcf | 172 | typedef struct { |
dflet | 0:e89ba455dbcf | 173 | _SlCmdCtrl_t *pCmdCtrl; |
dflet | 0:e89ba455dbcf | 174 | uint8_t *pTxRxDescBuff; |
dflet | 0:e89ba455dbcf | 175 | _SlCmdExt_t *pCmdExt; |
dflet | 0:e89ba455dbcf | 176 | AsyncExt_t AsyncExt; |
dflet | 0:e89ba455dbcf | 177 | } _SlFunctionParams_t; |
dflet | 0:e89ba455dbcf | 178 | |
dflet | 0:e89ba455dbcf | 179 | typedef void (*P_INIT_CALLBACK)(uint32_t Status); |
dflet | 0:e89ba455dbcf | 180 | |
dflet | 0:e89ba455dbcf | 181 | typedef struct { |
dflet | 0:e89ba455dbcf | 182 | _SlFd_t FD; |
dflet | 0:e89ba455dbcf | 183 | _SlLockObj_t GlobalLockObj; |
dflet | 0:e89ba455dbcf | 184 | _SlCommandHeader_t TempProtocolHeader; |
dflet | 0:e89ba455dbcf | 185 | P_INIT_CALLBACK pInitCallback; |
dflet | 0:e89ba455dbcf | 186 | |
dflet | 0:e89ba455dbcf | 187 | _SlPoolObj_t ObjPool[MAX_CONCURRENT_ACTIONS]; |
dflet | 0:e89ba455dbcf | 188 | uint8_t FreePoolIdx; |
dflet | 0:e89ba455dbcf | 189 | uint8_t PendingPoolIdx; |
dflet | 0:e89ba455dbcf | 190 | uint8_t ActivePoolIdx; |
dflet | 0:e89ba455dbcf | 191 | uint32_t ActiveActionsBitmap; |
dflet | 0:e89ba455dbcf | 192 | _SlLockObj_t ProtectionLockObj; |
dflet | 0:e89ba455dbcf | 193 | |
dflet | 0:e89ba455dbcf | 194 | _SlSyncObj_t CmdSyncObj; |
dflet | 0:e89ba455dbcf | 195 | uint8_t IsCmdRespWaited; |
dflet | 0:e89ba455dbcf | 196 | |
dflet | 0:e89ba455dbcf | 197 | _SlFlowContCB_t FlowContCB; |
dflet | 0:e89ba455dbcf | 198 | |
dflet | 0:e89ba455dbcf | 199 | uint8_t TxSeqNum; |
dflet | 0:e89ba455dbcf | 200 | volatile uint8_t RxIrqCnt; |
dflet | 0:e89ba455dbcf | 201 | uint8_t RxDoneCnt; |
dflet | 0:e89ba455dbcf | 202 | uint8_t SocketNonBlocking; |
dflet | 0:e89ba455dbcf | 203 | uint8_t SocketTXFailure; |
dflet | 0:e89ba455dbcf | 204 | uint8_t RelayFlagsViaRxPayload; |
dflet | 0:e89ba455dbcf | 205 | /* for stack reduction the parameters are globals */ |
dflet | 0:e89ba455dbcf | 206 | _SlFunctionParams_t FunctionParams; |
dflet | 0:e89ba455dbcf | 207 | |
dflet | 0:e89ba455dbcf | 208 | } _SlDriverCb_t; |
dflet | 0:e89ba455dbcf | 209 | |
dflet | 0:e89ba455dbcf | 210 | extern _SlDriverCb_t* g_pCB; |
dflet | 0:e89ba455dbcf | 211 | typedef uint8_t _SlSd_t; |
dflet | 0:e89ba455dbcf | 212 | |
dflet | 0:e89ba455dbcf | 213 | class cc3100_driver |
dflet | 0:e89ba455dbcf | 214 | { |
dflet | 0:e89ba455dbcf | 215 | |
dflet | 0:e89ba455dbcf | 216 | public: |
dflet | 0:e89ba455dbcf | 217 | |
dflet | 0:e89ba455dbcf | 218 | cc3100_driver(cc3100_nonos &nonos, cc3100_netapp &netapp, cc3100_flowcont &flowcont, cc3100_spi &spi); |
dflet | 0:e89ba455dbcf | 219 | |
dflet | 0:e89ba455dbcf | 220 | ~cc3100_driver(); |
dflet | 0:e89ba455dbcf | 221 | |
dflet | 0:e89ba455dbcf | 222 | |
dflet | 0:e89ba455dbcf | 223 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 224 | /* Function prototypes */ |
dflet | 0:e89ba455dbcf | 225 | /*****************************************************************************/ |
dflet | 0:e89ba455dbcf | 226 | typedef _SlDriverCb_t pDriver; |
dflet | 0:e89ba455dbcf | 227 | |
dflet | 0:e89ba455dbcf | 228 | bool _SL_PENDING_RX_MSG(pDriver* pDriverCB); |
dflet | 0:e89ba455dbcf | 229 | |
dflet | 0:e89ba455dbcf | 230 | void _SlDrvDriverCBInit(void); |
dflet | 0:e89ba455dbcf | 231 | |
dflet | 0:e89ba455dbcf | 232 | void _SlDrvDriverCBDeinit(void); |
dflet | 0:e89ba455dbcf | 233 | |
dflet | 0:e89ba455dbcf | 234 | void _SlDrvRxIrqHandler(void *pValue); |
dflet | 0:e89ba455dbcf | 235 | |
dflet | 0:e89ba455dbcf | 236 | _SlReturnVal_t _SlDrvCmdOp(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt); |
dflet | 0:e89ba455dbcf | 237 | |
dflet | 0:e89ba455dbcf | 238 | _SlReturnVal_t _SlDrvCmdSend(_SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt); |
dflet | 0:e89ba455dbcf | 239 | |
dflet | 0:e89ba455dbcf | 240 | _SlReturnVal_t _SlDrvDataReadOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt); |
dflet | 0:e89ba455dbcf | 241 | |
dflet | 0:e89ba455dbcf | 242 | _SlReturnVal_t _SlDrvDataWriteOp(_SlSd_t Sd, _SlCmdCtrl_t *pCmdCtrl , void* pTxRxDescBuff , _SlCmdExt_t* pCmdExt); |
dflet | 0:e89ba455dbcf | 243 | |
dflet | 0:e89ba455dbcf | 244 | int16_t _SlDrvBasicCmd(_SlOpcode_t Opcode); |
dflet | 0:e89ba455dbcf | 245 | |
dflet | 0:e89ba455dbcf | 246 | int16_t _SlDrvWaitForPoolObj(uint32_t ActionID, uint8_t SocketID); |
dflet | 0:e89ba455dbcf | 247 | |
dflet | 0:e89ba455dbcf | 248 | void _SlDrvReleasePoolObj(uint8_t pObj); |
dflet | 0:e89ba455dbcf | 249 | |
dflet | 0:e89ba455dbcf | 250 | void _SlDrvObjInit(void); |
dflet | 0:e89ba455dbcf | 251 | |
dflet | 0:e89ba455dbcf | 252 | _SlReturnVal_t _SlDrvMsgRead(void); |
dflet | 0:e89ba455dbcf | 253 | |
dflet | 0:e89ba455dbcf | 254 | _SlReturnVal_t _SlDrvMsgWrite(void); |
dflet | 0:e89ba455dbcf | 255 | |
dflet | 0:e89ba455dbcf | 256 | _SlReturnVal_t _SlDrvMsgReadCmdCtx(void); |
dflet | 0:e89ba455dbcf | 257 | |
dflet | 0:e89ba455dbcf | 258 | _SlReturnVal_t _SlDrvMsgReadSpawnCtx_(void *pValue); |
dflet | 0:e89ba455dbcf | 259 | |
dflet | 0:e89ba455dbcf | 260 | void _SlDrvClassifyRxMsg(_SlOpcode_t Opcode ); |
dflet | 0:e89ba455dbcf | 261 | |
dflet | 0:e89ba455dbcf | 262 | _SlReturnVal_t _SlDrvRxHdrRead(uint8_t *pBuf, uint8_t *pAlignSize); |
dflet | 0:e89ba455dbcf | 263 | |
dflet | 0:e89ba455dbcf | 264 | void _SlDrvShiftDWord(uint8_t *pBuf); |
dflet | 0:e89ba455dbcf | 265 | |
dflet | 0:e89ba455dbcf | 266 | void _SlAsyncEventGenericHandler(void); |
dflet | 0:e89ba455dbcf | 267 | |
dflet | 0:e89ba455dbcf | 268 | void _SlDrvObjDeInit(void); |
dflet | 0:e89ba455dbcf | 269 | |
dflet | 0:e89ba455dbcf | 270 | void _SlRemoveFromList(uint8_t* ListIndex, uint8_t ItemIndex); |
dflet | 0:e89ba455dbcf | 271 | |
dflet | 0:e89ba455dbcf | 272 | _SlReturnVal_t _SlFindAndSetActiveObj(_SlOpcode_t Opcode, uint8_t Sd); |
dflet | 0:e89ba455dbcf | 273 | |
dflet | 0:e89ba455dbcf | 274 | private: |
dflet | 0:e89ba455dbcf | 275 | |
dflet | 0:e89ba455dbcf | 276 | cc3100_nonos &_nonos; |
dflet | 0:e89ba455dbcf | 277 | cc3100_netapp &_netapp; |
dflet | 0:e89ba455dbcf | 278 | cc3100_flowcont &_flowcont; |
dflet | 0:e89ba455dbcf | 279 | cc3100_spi &_spi; |
dflet | 0:e89ba455dbcf | 280 | |
dflet | 0:e89ba455dbcf | 281 | };//class |
dflet | 0:e89ba455dbcf | 282 | |
dflet | 0:e89ba455dbcf | 283 | }//namespace mbed_cc3100 |
dflet | 0:e89ba455dbcf | 284 | |
dflet | 0:e89ba455dbcf | 285 | #endif /* __DRIVER_INT_H__ */ |
dflet | 0:e89ba455dbcf | 286 |