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