Updated to use external spawn.

Fork of simplelink_V2 by David Fletcher

Committer:
dflet
Date:
Sat Jun 06 13:48:29 2015 +0000
Revision:
1:9b68e650b3f6
Parent:
0:1a07906111ec
Oppps

Who changed what in which revision?

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