TI's CC3100. A test demo with very little testing done!
Fork of cc3100_Test_Demo2 by
Diff: simplelink/cc3100_sl_common.h
- Revision:
- 6:778b081f6a13
- Child:
- 7:0687d16b9781
diff -r d3b320ebd469 -r 778b081f6a13 simplelink/cc3100_sl_common.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/simplelink/cc3100_sl_common.h Thu Mar 19 15:39:08 2015 +0000 @@ -0,0 +1,95 @@ +/* + * sl_config.h - get time sample application + * + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * + * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef SL_CONFIG_H_ +#define SL_CONFIG_H_ + +//***************************************************************************** +// +// If building with a C++ compiler, make all of the definitions in this header +// have a C binding. +// +//***************************************************************************** + +/**/ + +namespace mbed_cc3100 { + +#define LOOP_FOREVER() \ + {\ + while(1); \ + } + +#define ASSERT_ON_ERROR(error_code) \ + {\ + /* Handling the error-codes is specific to the application */ \ + if (error_code < 0) return error_code; \ + /* else, continue w/ execution */ \ + } + + +/* + * Values for below macros shall be modified per the access-point's (AP) properties + * SimpleLink device will connect to following AP when the application is executed + */ + +#define SSID_NAME "OpenWrt" /* Access point name to connect to. */ +#define SEC_TYPE SL_SEC_TYPE_WPA_WPA2 /* Security type of the Access point */ +#define PASSKEY "**********" /* Password in case of secure AP */ +#define PASSKEY_LEN strlen(PASSKEY) /* Password length in case of secure AP */ + +/* Configuration of the device when it comes up in AP mode */ +#define SSID_AP_MODE "mysimplelink" /* SSID of the CC3100 in AP mode */ +#define PASSWORD_AP_MODE "" /* Password of CC3100 AP */ +#define SEC_TYPE_AP_MODE SL_SEC_TYPE_OPEN /* Can take SL_SEC_TYPE_WEP or +* SL_SEC_TYPE_WPA as well */ + +/* + * Values for below macros shall be modified based on current time + */ +#define DATE 7 /* Current Date */ +#define MONTH 2 /* Month */ +#define YEAR 2015 /* Current year */ +#define HOUR 10 /* Time - hours */ +#define MINUTE 34 /* Time - minutes */ +#define SECOND 0 /* Time - seconds */ + +#define SUCCESS 0 + +}//namespace mbed_cc3100 + +#endif /*__SL_CONFIG_H__*/ +