TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.
Diff: simplelink/cc3100_driver.cpp
- Revision:
- 1:e448e81c416f
- Parent:
- 0:400d8e75a8d0
--- a/simplelink/cc3100_driver.cpp Sun Sep 06 15:19:36 2015 +0000 +++ b/simplelink/cc3100_driver.cpp Fri Sep 11 15:38:33 2015 +0000 @@ -345,11 +345,7 @@ #else _nonos._SlNonOsSpawn((_SlSpawnEntryFunc_t)&_SlDrvMsgReadSpawnCtx, NULL, 0); #endif -//#ifndef SL_PLATFORM_MULTI_THREADED -// _nonos._SlNonOsSpawn((_SlSpawnEntryFunc_t)&_SlDrvMsgReadSpawnCtx, NULL, 0); -//#else -// sl_Spawn((_SlSpawnEntryFunc_t)&_SlDrvMsgReadSpawnCtx, NULL, 0); -//#endif + } } @@ -358,7 +354,6 @@ *****************************************************************************/ _SlReturnVal_t cc3100_driver::_SlDrvCmdOp(_SlCmdCtrl_t *pCmdCtrl,void* pTxRxDescBuff, _SlCmdExt_t *pCmdExt) { - //printf("_SlDrvCmdOp\r\n"); _SlReturnVal_t RetVal; _SlDrvObjLockWaitForever(&g_pCB->GlobalLockObj); @@ -532,7 +527,6 @@ /* ******************************************************************************/ _SlReturnVal_t cc3100_driver::_SlDrvMsgWrite(_SlCmdCtrl_t *pCmdCtrl, _SlCmdExt_t *pCmdExt, uint8_t *pTxRxDescBuff) { - //printf("_SlDrvMsgWrite\r\n"); uint8_t sendRxPayload = FALSE; VERIFY_PROTOCOL(NULL != pCmdCtrl); @@ -978,72 +972,6 @@ } /* ******************************************************************************/ -/* _SlDrvMsgReadSpawnCtx */ -/* ******************************************************************************/ -/* -_SlReturnVal_t cc3100_driver::_SlDrvMsgReadSpawnCtx_(void *pValue) -{ - -#ifdef SL_POLLING_MODE_USED - int16_t retCode = OSI_OK; - // for polling based systems - do { - retCode = sl_LockObjLock(&g_pCB->GlobalLockObj, 0); - if ( OSI_OK != retCode ) { - if (TRUE == g_pCB->IsCmdRespWaited) { - _SlDrvSyncObjSignal(&g_pCB->CmdSyncObj); - return SL_RET_CODE_OK; - } - } - - } while (OSI_OK != retCode); - -#else - _SlDrvObjLockWaitForever(&g_pCB->GlobalLockObj); -#endif - - // Messages might have been read by CmdResp context. Therefore after - // getting LockObj, check again where the Pending Rx Msg is still present. - if(FALSE == (_SL_PENDING_RX_MSG(g_pCB))) { - _SlDrvObjUnLock(&g_pCB->GlobalLockObj); - return SL_RET_CODE_OK; - } - - VERIFY_RET_OK(_SlDrvMsgRead()); - - g_pCB->RxDoneCnt++; - - switch(g_pCB->FunctionParams.AsyncExt.RxMsgClass) { - case ASYNC_EVT_CLASS: - // If got here and protected by LockObj a message is waiting - // to be read - VERIFY_PROTOCOL(NULL != g_pCB->FunctionParams.AsyncExt.pAsyncBuf); - - _SlAsyncEventGenericHandler(); - -#ifdef SL_MEMORY_MGMT_DYNAMIC - sl_Free(g_pCB->FunctionParams.AsyncExt.pAsyncBuf); -#else - g_pCB->FunctionParams.AsyncExt.pAsyncBuf = NULL; -#endif - break; - case DUMMY_MSG_CLASS: - case RECV_RESP_CLASS: - // These types are legal in this context. Do nothing - break; - case CMD_RESP_CLASS: - // Command response is illegal in this context. - // No 'break' here: Assert! - default: - VERIFY_PROTOCOL(0); - } - - _SlDrvObjUnLock(&g_pCB->GlobalLockObj); - - return(SL_RET_CODE_OK); -} -*/ -/* ******************************************************************************/ /* _SlDrvClassifyRxMsg */ /* ******************************************************************************/ void cc3100_driver::_SlDrvClassifyRxMsg(_SlOpcode_t Opcode) @@ -1351,7 +1279,7 @@ /* ******************************************************************************/ void cc3100_driver::_SlRemoveFromList(uint8_t *ListIndex, uint8_t ItemIndex) { - #ifndef SL_TINY_EXT +#ifndef SL_TINY_EXT uint8_t Idx; #endif