TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.
Revision 1:e448e81c416f, committed 2015-09-11
- Comitter:
- dflet
- Date:
- Fri Sep 11 15:38:33 2015 +0000
- Parent:
- 0:400d8e75a8d0
- Commit message:
- Removed some debud.
Changed in this revision
--- a/main.cpp Sun Sep 06 15:19:36 2015 +0000
+++ b/main.cpp Fri Sep 11 15:38:33 2015 +0000
@@ -68,6 +68,7 @@
* HttpSocket.cpp
* HttpStatic.cpp
* fPtr_func.cpp
+ * cc3100_spawn.cpp
*/
/* On board leds */
@@ -117,7 +118,6 @@
//!
//*****************************************************************************
-//#ifndef NOTERM
static void
DisplayBanner(char * AppName)
{
@@ -128,7 +128,6 @@
Report(" *************************************************\n\r");
Report("\n\n\n\r");
}
-//#endif
//****************************************************************************
// MAIN FUNCTION
@@ -143,9 +142,6 @@
//
CLI_Configure();
initLEDs();
-
-// toggleLed(1);
-//#ifndef NOTERM
memset(print_buf, 0x00, PRINT_BUF_LEN);
sprintf((char*) print_buf, " \r\nSystemCoreClock = %dMHz\r\n ", SystemCoreClock /1000000);
@@ -161,8 +157,6 @@
// Display Application Banner
//
DisplayBanner(APP_NAME);
-
-//#endif
//
// Start the SimpleLink Host
@@ -190,108 +184,6 @@
return 0;
}
-/**
- * @brief This function handles Hard Fault exception.
- * @param None
- * @retval None
- */
-extern "C" void HardFault_Handler(void)
-{
- /* Go to infinite loop when Hard Fault exception occurs */
- Uart_Write((uint8_t*)"\n\rHardFault_Handler \n\r");
- printf("Hard Fault Register SCB->HSFR 0x%X \r\n",SCB->HFSR);
- printf("Fault bits set SCB->CFSR 0x%X \r\n",SCB->CFSR);
- printf("Call to Memory Address SCB->BFAR 0x%X ERROR!\r\n",SCB->BFAR);
- printf("Call to Memory Address SCB->MMFAR 0x%X ERROR!\r\n",SCB->MMFAR);
- Uart_Write((uint8_t*)"HardFault_Handler \n\r");
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Memory Manage exception.
- * @param None
- * @retval None
- */
-extern "C" void MemManage_Handler(void)
-{
- Uart_Write((uint8_t*)"\n\rMemManage_Handler \n\r");
- printf("Fault bits set SCB->CFSR 0x%X \r\n",SCB->CFSR);
- printf("Call to Memory Address SCB->BFAR 0x%X ERROR!\r\n",SCB->BFAR);
- printf("Call to Memory Address SCB->MMFAR 0x%X ERROR!\r\n",SCB->MMFAR);
- Uart_Write((uint8_t*)"MemManage_Handler \n\r");
- /* Go to infinite loop when Memory Manage exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Bus Fault exception.
- * @param None
- * @retval None
- */
-extern "C" void BusFault_Handler(void)
-{
- Uart_Write((uint8_t*)"\n\rBusFault_Handler \n\r");
- printf("Fault bits set SCB->CFSR 0x%X \r\n",SCB->CFSR);
- printf("Call to Memory Address SCB->BFAR 0x%X ERROR!\r\n",SCB->BFAR);
- printf("Call to Memory Address SCB->MMFAR 0x%X ERROR!\r\n",SCB->MMFAR);
- Uart_Write((uint8_t*)"BusFault_Handler \n\r");
- /* Go to infinite loop when Bus Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Usage Fault exception.
- * @param None
- * @retval None
- */
-extern "C" void UsageFault_Handler(void)
-{
- Uart_Write((uint8_t*)"UsageFault_Handler \n\r");
- /* Go to infinite loop when Usage Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles SVCall exception.
- * @param None
- * @retval None
- */
-/*
-extern "C" void SVC_Handler(void)
-{
- Uart_Write((uint8_t*)"SVC_Handler \n\r");
-}
-*/
-/**
- * @brief This function handles Debug Monitor exception.
- * @param None
- * @retval None
- */
-extern "C" void DebugMon_Handler(void)
-{
- Uart_Write((uint8_t*)"DebugMon_Handler \n\r");
-}
-
-/**
- * @brief This function handles PendSVC exception.
- * @param None
- * @retval None
- */
-/*
-extern "C" void PendSV_Handler(void)
-{
- Uart_Write((uint8_t*)"PendSV_Handler \n\r");
-}
-*/
-
//*****************************************************************************
//
// Close the Doxygen group.
--- 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
--- a/simplelink/cc3100_driver.h Sun Sep 06 15:19:36 2015 +0000 +++ b/simplelink/cc3100_driver.h Fri Sep 11 15:38:33 2015 +0000 @@ -42,9 +42,7 @@ #include "cc3100_protocol.h" #include "cc3100_spi.h" -//#include "cc3100_nonos.h" #include "cc3100_netapp.h" -//#include "cc3100.h" #ifdef SL_PLATFORM_MULTI_THREADED #include "osi.h"
--- a/simplelink/cc3100_sl_common.h Sun Sep 06 15:19:36 2015 +0000 +++ b/simplelink/cc3100_sl_common.h Fri Sep 11 15:38:33 2015 +0000 @@ -67,11 +67,11 @@ * Values for below macros shall be modified per the access-point's (AP) properties * SimpleLink device will connect to following AP when the application is executed */ -#define SSID_NAME "SKY2B112" +#define SSID_NAME "********" //#define SSID_NAME "OpenWrt" /* Access point name to connect to. */ #define SEC_TYPE SL_SEC_TYPE_WPA_WPA2 /* Security type of the Access point */ -#define PASSKEY "YBCVWVCB" -//#define PASSKEY "BCVWVCBY" /* Password in case of secure AP */ +#define PASSKEY "************" +//#define PASSKEY "*********" /* Password in case of secure AP */ #define PASSKEY_LEN strlen(PASSKEY) /* Password length in case of secure AP */ /* Configuration of the device when it comes up in AP mode */