tcp client for cc3000, using mbed socket interface

Dependencies:   NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed

Committer:
Kojto
Date:
Thu Sep 26 20:31:40 2013 +0000
Revision:
0:2ffed535a426
Child:
2:c8cd9df34be9
initial version tcp client

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 0:2ffed535a426 1 /* mbed Microcontroller Library
Kojto 0:2ffed535a426 2 * Copyright (c) 2006-2013 ARM Limited
Kojto 0:2ffed535a426 3 *
Kojto 0:2ffed535a426 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 0:2ffed535a426 5 * you may not use this file except in compliance with the License.
Kojto 0:2ffed535a426 6 * You may obtain a copy of the License at
Kojto 0:2ffed535a426 7 *
Kojto 0:2ffed535a426 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 0:2ffed535a426 9 *
Kojto 0:2ffed535a426 10 * Unless required by applicable law or agreed to in writing, software
Kojto 0:2ffed535a426 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 0:2ffed535a426 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 0:2ffed535a426 13 * See the License for the specific language governing permissions and
Kojto 0:2ffed535a426 14 * limitations under the License.
Kojto 0:2ffed535a426 15 */
Kojto 0:2ffed535a426 16 #ifndef MAIN_H
Kojto 0:2ffed535a426 17 #define MAIN_H
Kojto 0:2ffed535a426 18
Kojto 0:2ffed535a426 19 /* use this defines in AP_SECURITY */
Kojto 0:2ffed535a426 20 #define NONE 0
Kojto 0:2ffed535a426 21 #define WEP 1
Kojto 0:2ffed535a426 22 #define WPA 2
Kojto 0:2ffed535a426 23 #define WPA2 3
Kojto 0:2ffed535a426 24
Kojto 0:2ffed535a426 25 // use smart config
Kojto 0:2ffed535a426 26 #define USE_SMART_CONFIG 0
Kojto 0:2ffed535a426 27
Kojto 0:2ffed535a426 28 // Default SSID Settings
Kojto 0:2ffed535a426 29 #define AP_KEY "test"
Kojto 0:2ffed535a426 30 #define AP_SECURITY WPA2 // WPA2 must be enabled for use with iPhone or Android phone hotspot!
Kojto 0:2ffed535a426 31 #define SSID "test"
Kojto 0:2ffed535a426 32 /* Board specific */
Kojto 0:2ffed535a426 33 #define WIGO_BOARD 1
Kojto 0:2ffed535a426 34
Kojto 0:2ffed535a426 35 #if (WIGO_BOARD == 1)
Kojto 0:2ffed535a426 36
Kojto 0:2ffed535a426 37 #define SET_PWR_EN1 PWR_EN1 = 0
Kojto 0:2ffed535a426 38 #define SET_PWR_EN2 PWR_EN2 = 1
Kojto 0:2ffed535a426 39
Kojto 0:2ffed535a426 40 #define WLAN_ISF_PCR PORTA->PCR[16]
Kojto 0:2ffed535a426 41 #define WLAN_ISF_ISFR PORTA->ISFR
Kojto 0:2ffed535a426 42 #define WLAN_ISF_MASK (1<<16)
Kojto 0:2ffed535a426 43
Kojto 0:2ffed535a426 44 #define CLEAR_PCR_INTERRUPT WLAN_ISF_PCR|=PORT_PCR_ISF_MASK;
Kojto 0:2ffed535a426 45 #define CLEAN_PORT_INTERRUPT WLAN_ISF_ISFR|=WLAN_ISF_MASK;
Kojto 0:2ffed535a426 46
Kojto 0:2ffed535a426 47 #else
Kojto 0:2ffed535a426 48
Kojto 0:2ffed535a426 49 #endif
Kojto 0:2ffed535a426 50
Kojto 0:2ffed535a426 51 #endif