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

Revision:
17:acc075ff3fcb
Parent:
16:7e5aab2fabba
Child:
19:3dd3e7f30f8b
--- a/main.cpp	Sun Aug 30 21:10:11 2015 +0000
+++ b/main.cpp	Mon Aug 31 15:20:36 2015 +0000
@@ -49,22 +49,14 @@
 #include "cc3100_simplelink.h"
 #include "cc3100.h"
 
-#include "httpserverapp.h"
-
-//#include "stm32f4xx_hal.h"
-//#include "stm32f4xx_hal_rcc.h"
-
 /* Free-RTOS includes */
 #include "FreeRTOS.h"
-//#include "task.h"
-//#include "semphr.h"
-//#include "portmacro.h"
-
 #include "osi.h"
 
 #include "cli_uart.h"
 #include "app_config.h"
 #include "myBoardInit.h"
+#include "httpserverapp.h"
 #include "camera_app.h"
 
 using namespace mbed_cc3100;
@@ -83,7 +75,6 @@
 /* Off board leds */
   DigitalOut led1(PB_15);
   DigitalOut led2(PB_14);
-//Serial pc(USBTX, USBRX);
 cc3100 _cc3100(NC, NC, PD_12, PD_13, PD_11, SPI(PB_5, PB_4, PB_3));//Seeed_Arch_Max  irq, nHib, cs, mosi, miso, sck
 
 static void Start_MCO1(void);
@@ -122,13 +113,13 @@
     GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
     HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
     
-//    #ifndef MT9D111_CAM 
+#ifndef MT9D111_CAM 
     /* MCO1 output 16MHz */   
-//    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1);
-//#else 
+    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1);
+#else 
     /* MCO1 output 8MHz */   
-//    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_2);
-//#endif
+    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_2);
+#endif
     wait_ms(500);
     
 }
@@ -194,9 +185,7 @@
    
    initLEDs();
 
-//   toggleLed(1);
-//#ifndef NOTERM
-    
+//#ifndef NOTERM    
     memset(print_buf, 0x00, PRINT_BUF_LEN);
     sprintf((char*) print_buf, " \r\nSystemCoreClock = %dMHz\r\n ", SystemCoreClock /1000000);
     rv = Uart_Write((uint8_t *) print_buf);
@@ -224,7 +213,6 @@
     // Start the HttpServer Task
     //
     //
-
     osi_TaskCreate(HttpServerAppTask,
                     "WebSocketApp",
                         OSI_STACK_SIZE,