Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NTPClient WebSocketClient cc3000_hostdriver_mbedsocket mbed HTTPClient
wifi.h@0:039d229f3d6b, 2013-10-07 (annotated)
- Committer:
- SolderSplashLabs
- Date:
- Mon Oct 07 21:18:18 2013 +0000
- Revision:
- 0:039d229f3d6b
- Child:
- 5:506f580e7ead
First commit, work in progress
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| SolderSplashLabs | 0:039d229f3d6b | 1 | /* mbed Microcontroller Library |
| SolderSplashLabs | 0:039d229f3d6b | 2 | * Copyright (c) 2006-2013 ARM Limited |
| SolderSplashLabs | 0:039d229f3d6b | 3 | * |
| SolderSplashLabs | 0:039d229f3d6b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| SolderSplashLabs | 0:039d229f3d6b | 5 | * you may not use this file except in compliance with the License. |
| SolderSplashLabs | 0:039d229f3d6b | 6 | * You may obtain a copy of the License at |
| SolderSplashLabs | 0:039d229f3d6b | 7 | * |
| SolderSplashLabs | 0:039d229f3d6b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| SolderSplashLabs | 0:039d229f3d6b | 9 | * |
| SolderSplashLabs | 0:039d229f3d6b | 10 | * Unless required by applicable law or agreed to in writing, software |
| SolderSplashLabs | 0:039d229f3d6b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| SolderSplashLabs | 0:039d229f3d6b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| SolderSplashLabs | 0:039d229f3d6b | 13 | * See the License for the specific language governing permissions and |
| SolderSplashLabs | 0:039d229f3d6b | 14 | * limitations under the License. |
| SolderSplashLabs | 0:039d229f3d6b | 15 | */ |
| SolderSplashLabs | 0:039d229f3d6b | 16 | #ifndef WIFI_H |
| SolderSplashLabs | 0:039d229f3d6b | 17 | #define WIFI_H |
| SolderSplashLabs | 0:039d229f3d6b | 18 | |
| SolderSplashLabs | 0:039d229f3d6b | 19 | #include "cc3000.h" |
| SolderSplashLabs | 0:039d229f3d6b | 20 | |
| SolderSplashLabs | 0:039d229f3d6b | 21 | #define WIGO 1 |
| SolderSplashLabs | 0:039d229f3d6b | 22 | #define WIFI_DIPCORTEX 2 |
| SolderSplashLabs | 0:039d229f3d6b | 23 | #define UNDEFINED 3 |
| SolderSplashLabs | 0:039d229f3d6b | 24 | |
| SolderSplashLabs | 0:039d229f3d6b | 25 | #define MY_BOARD WIFI_DIPCORTEX |
| SolderSplashLabs | 0:039d229f3d6b | 26 | |
| SolderSplashLabs | 0:039d229f3d6b | 27 | // use this defines in AP_SECURITY |
| SolderSplashLabs | 0:039d229f3d6b | 28 | #define NONE 0 |
| SolderSplashLabs | 0:039d229f3d6b | 29 | #define WEP 1 |
| SolderSplashLabs | 0:039d229f3d6b | 30 | #define WPA 2 |
| SolderSplashLabs | 0:039d229f3d6b | 31 | #define WPA2 3 |
| SolderSplashLabs | 0:039d229f3d6b | 32 | |
| SolderSplashLabs | 0:039d229f3d6b | 33 | // use smart config |
| SolderSplashLabs | 0:039d229f3d6b | 34 | #define USE_SMART_CONFIG 0 |
| SolderSplashLabs | 0:039d229f3d6b | 35 | |
| SolderSplashLabs | 0:039d229f3d6b | 36 | // Default SSID Settings |
| SolderSplashLabs | 0:039d229f3d6b | 37 | #define SSID "soldersplash" |
| SolderSplashLabs | 0:039d229f3d6b | 38 | #define AP_KEY "wifidipcortex" |
| SolderSplashLabs | 0:039d229f3d6b | 39 | #define AP_SECURITY WPA2 |
| SolderSplashLabs | 0:039d229f3d6b | 40 | |
| SolderSplashLabs | 0:039d229f3d6b | 41 | void init(); |
| SolderSplashLabs | 0:039d229f3d6b | 42 | void connect_to_ssid(uint8_t *ssid); |
| SolderSplashLabs | 0:039d229f3d6b | 43 | void connect_to_ssid(char *ssid, char *key, unsigned char sec_mode); |
| SolderSplashLabs | 0:039d229f3d6b | 44 | void print_cc3000_info(); |
| SolderSplashLabs | 0:039d229f3d6b | 45 | |
| SolderSplashLabs | 0:039d229f3d6b | 46 | #endif |