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

Committer:
dflet
Date:
Tue Sep 15 16:45:04 2015 +0000
Revision:
22:f9b5e0b80bf2
Parent:
0:50cedd586816
Removed some debug.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:50cedd586816 1 /*
dflet 0:50cedd586816 2 * sl_config.h - get time sample application
dflet 0:50cedd586816 3 *
dflet 0:50cedd586816 4 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
dflet 0:50cedd586816 5 *
dflet 0:50cedd586816 6 *
dflet 0:50cedd586816 7 * Redistribution and use in source and binary forms, with or without
dflet 0:50cedd586816 8 * modification, are permitted provided that the following conditions
dflet 0:50cedd586816 9 * are met:
dflet 0:50cedd586816 10 *
dflet 0:50cedd586816 11 * Redistributions of source code must retain the above copyright
dflet 0:50cedd586816 12 * notice, this list of conditions and the following disclaimer.
dflet 0:50cedd586816 13 *
dflet 0:50cedd586816 14 * Redistributions in binary form must reproduce the above copyright
dflet 0:50cedd586816 15 * notice, this list of conditions and the following disclaimer in the
dflet 0:50cedd586816 16 * documentation and/or other materials provided with the
dflet 0:50cedd586816 17 * distribution.
dflet 0:50cedd586816 18 *
dflet 0:50cedd586816 19 * Neither the name of Texas Instruments Incorporated nor the names of
dflet 0:50cedd586816 20 * its contributors may be used to endorse or promote products derived
dflet 0:50cedd586816 21 * from this software without specific prior written permission.
dflet 0:50cedd586816 22 *
dflet 0:50cedd586816 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
dflet 0:50cedd586816 24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
dflet 0:50cedd586816 25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
dflet 0:50cedd586816 26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
dflet 0:50cedd586816 27 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dflet 0:50cedd586816 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
dflet 0:50cedd586816 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
dflet 0:50cedd586816 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
dflet 0:50cedd586816 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
dflet 0:50cedd586816 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
dflet 0:50cedd586816 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dflet 0:50cedd586816 34 *
dflet 0:50cedd586816 35 */
dflet 0:50cedd586816 36
dflet 0:50cedd586816 37 #ifndef SL_CONFIG_H_
dflet 0:50cedd586816 38 #define SL_CONFIG_H_
dflet 0:50cedd586816 39
dflet 0:50cedd586816 40 #include "mbed.h"
dflet 0:50cedd586816 41
dflet 0:50cedd586816 42 //*****************************************************************************
dflet 0:50cedd586816 43 //
dflet 0:50cedd586816 44 // If building with a C++ compiler, make all of the definitions in this header
dflet 0:50cedd586816 45 // have a C binding.
dflet 0:50cedd586816 46 //
dflet 0:50cedd586816 47 //*****************************************************************************
dflet 0:50cedd586816 48
dflet 0:50cedd586816 49 /**/
dflet 0:50cedd586816 50
dflet 0:50cedd586816 51 namespace mbed_cc3100 {
dflet 0:50cedd586816 52
dflet 0:50cedd586816 53 #define LOOP_FOREVER() \
dflet 0:50cedd586816 54 {\
dflet 0:50cedd586816 55 while(1); \
dflet 0:50cedd586816 56 }
dflet 0:50cedd586816 57
dflet 0:50cedd586816 58 #define ASSERT_ON_ERROR(error_code) \
dflet 0:50cedd586816 59 {\
dflet 0:50cedd586816 60 /* Handling the error-codes is specific to the application */ \
dflet 0:50cedd586816 61 if (error_code < 0) return error_code; \
dflet 0:50cedd586816 62 /* else, continue w/ execution */ \
dflet 0:50cedd586816 63 }
dflet 0:50cedd586816 64
dflet 0:50cedd586816 65
dflet 0:50cedd586816 66 /*
dflet 0:50cedd586816 67 * Values for below macros shall be modified per the access-point's (AP) properties
dflet 0:50cedd586816 68 * SimpleLink device will connect to following AP when the application is executed
dflet 0:50cedd586816 69 */
dflet 22:f9b5e0b80bf2 70 #define SSID_NAME "***********"
dflet 0:50cedd586816 71 //#define SSID_NAME "OpenWrt" /* Access point name to connect to. */
dflet 0:50cedd586816 72 #define SEC_TYPE SL_SEC_TYPE_WPA_WPA2 /* Security type of the Access point */
dflet 22:f9b5e0b80bf2 73 #define PASSKEY "*************"
dflet 22:f9b5e0b80bf2 74 //#define PASSKEY "***********" /* Password in case of secure AP */
dflet 0:50cedd586816 75 #define PASSKEY_LEN strlen(PASSKEY) /* Password length in case of secure AP */
dflet 0:50cedd586816 76
dflet 0:50cedd586816 77 /* Configuration of the device when it comes up in AP mode */
dflet 0:50cedd586816 78 #define SSID_AP_MODE "mysimplelink" /* SSID of the CC3100 in AP mode */
dflet 0:50cedd586816 79 #define PASSWORD_AP_MODE "" /* Password of CC3100 AP */
dflet 0:50cedd586816 80 #define SEC_TYPE_AP_MODE SL_SEC_TYPE_OPEN /* Can take SL_SEC_TYPE_WEP or
dflet 0:50cedd586816 81 * SL_SEC_TYPE_WPA as well */
dflet 0:50cedd586816 82
dflet 0:50cedd586816 83 /*
dflet 0:50cedd586816 84 * Values for below macros shall be modified based on current time
dflet 0:50cedd586816 85 */
dflet 0:50cedd586816 86 #define DATE 26 /* Current Date */
dflet 0:50cedd586816 87 #define MONTH 4 /* Month */
dflet 0:50cedd586816 88 #define YEAR 2015 /* Current year */
dflet 0:50cedd586816 89 #define HOUR 17 /* Time - hours */
dflet 0:50cedd586816 90 #define MINUTE 06 /* Time - minutes */
dflet 0:50cedd586816 91 #define SECOND 0 /* Time - seconds */
dflet 0:50cedd586816 92
dflet 0:50cedd586816 93 #define SUCCESS 0
dflet 0:50cedd586816 94
dflet 0:50cedd586816 95 }//namespace mbed_cc3100
dflet 0:50cedd586816 96
dflet 0:50cedd586816 97 #endif /*__SL_CONFIG_H__*/
dflet 0:50cedd586816 98