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:
19:3dd3e7f30f8b
Parent:
17:acc075ff3fcb
--- a/simplelink/cc3100_spi.cpp	Thu Sep 03 20:10:39 2015 +0000
+++ b/simplelink/cc3100_spi.cpp	Thu Sep 10 17:56:09 2015 +0000
@@ -54,7 +54,7 @@
     : /*_sw1_irq(button1_irq), _sw2_irq(button2_irq),*/ _wlan_irq(cc3100_irq), _wlan_nHIB(cc3100_nHIB), _wlan_cs(cc3100_cs), _wlan_spi(cc3100_spi), _driver(driver)
 {
 
-    _wlan_spi.format(8,0);//Note Mode 0
+    _wlan_spi.format(8,0);//Note: 8 bit Mode 0
     _wlan_spi.frequency(12000000);
     _wlan_irq.rise(this, &cc3100_spi::IntSpiGPIOHandler);      //_SlDrvRxIrqHandler is called from IntSpiGPIOHandler
 //    _sw1_irq.rise(this, &cc3100_spi::buttonHandler_1);
@@ -77,7 +77,7 @@
     // Disable WLAN Interrupt ...
     cc3100_InterruptDisable();
     
-    return NONOS_RET_OK;
+    return 0;
 }
 
 void cc3100_spi::button1_InterruptDisable()
@@ -129,7 +129,7 @@
     // Enable WLAN interrupt
     cc3100_InterruptEnable();
 
-    return NONOS_RET_OK;
+    return 0;
 }
 
 int cc3100_spi::spi_Write(Fd_t fd, uint8_t *pBuff, int len)
@@ -137,12 +137,12 @@
     int len_to_return = len;
     
     _wlan_cs = 0;
-  
+//    wait_us(10);
     while(len) {
         _wlan_spi.write(*pBuff++);
         len--;
     }
-
+//    wait_us(10);
     _wlan_cs = 1;
     
     return len_to_return;
@@ -153,11 +153,11 @@
     int i = 0;
 
     _wlan_cs = 0;
-
+//    wait_us(10);
     for (i = 0; i < len; i++) {
         pBuff[i] = _wlan_spi.write(0xFF);
     }
-
+//    wait_us(10);
     _wlan_cs = 1;
     return len;
 }