SimpleLink API Reference Manual  1.11.1
 All Data Structures Files Functions Variables Typedefs Macros Groups
wlan.h
Go to the documentation of this file.
1 /*****************************************************************************
2 *
3 * wlan.h - CC3000 Host Driver Implementation.
4 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the
16 * distribution.
17 *
18 * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 *****************************************************************************/
35 #ifndef __WLAN_H__
36 #define __WLAN_H__
37 
38 #include "cc3000_common.h"
39 
40 //*****************************************************************************
41 //
42 // If building with a C++ compiler, make all of the definitions in this header
43 // have a C binding.
44 //
45 //*****************************************************************************
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #define WLAN_SEC_UNSEC (0)
51 #define WLAN_SEC_WEP (1)
52 #define WLAN_SEC_WPA (2)
53 #define WLAN_SEC_WPA2 (3)
54 //*****************************************************************************
55 //
58 //
59 //*****************************************************************************
60 
61 
62 //*****************************************************************************
63 //
105 //
106 //*****************************************************************************
107 extern void wlan_init( tWlanCB sWlanCB,
108  tFWPatches sFWPatches,
109  tDriverPatches sDriverPatches,
110  tBootLoaderPatches sBootLoaderPatches,
111  tWlanReadInteruptPin sReadWlanInterruptPin,
112  tWlanInterruptEnable sWlanInterruptEnable,
113  tWlanInterruptDisable sWlanInterruptDisable,
114  tWriteWlanPin sWriteWlanPin);
115 
116 
117 
118 //*****************************************************************************
119 //
142 //
143 //*****************************************************************************
144 extern void wlan_start(unsigned short usPatchesAvailableAtHost);
145 
146 //*****************************************************************************
147 //
157 //
158 //*****************************************************************************
159 extern void wlan_stop(void);
160 
161 //*****************************************************************************
162 //
189 //
190 //*****************************************************************************
191 #ifndef CC3000_TINY_DRIVER
192 extern long wlan_connect(unsigned long ulSecType, char *ssid, long ssid_len,
193  unsigned char *bssid, unsigned char *key, long key_len);
194 #else
195 extern long wlan_connect(char *ssid, long ssid_len);
196 
197 #endif
198 
199 //*****************************************************************************
200 //
208 //
209 //*****************************************************************************
210 
211 extern long wlan_disconnect(void);
212 
213 //*****************************************************************************
214 //
238 //
239 //*****************************************************************************
240 
241 extern long wlan_add_profile(unsigned long ulSecType, unsigned char* ucSsid,
242  unsigned long ulSsidLen,
243  unsigned char *ucBssid,
244  unsigned long ulPriority,
245  unsigned long ulPairwiseCipher_Or_Key,
246  unsigned long ulGroupCipher_TxKeyLen,
247  unsigned long ulKeyMgmt,
248  unsigned char* ucPf_OrKey,
249  unsigned long ulPassPhraseLen);
250 
251 
252 
253 //*****************************************************************************
254 //
266 //
267 //*****************************************************************************
268 extern long wlan_ioctl_del_profile(unsigned long ulIndex);
269 
270 //*****************************************************************************
271 //
289 //
290 //*****************************************************************************
291 extern long wlan_set_event_mask(unsigned long ulMask);
292 
293 //*****************************************************************************
294 //
303 //
304 //*****************************************************************************
305 extern long wlan_ioctl_statusget(void);
306 
307 
308 //*****************************************************************************
309 //
337 //
338 //*****************************************************************************
340  unsigned long should_connect_to_open_ap,
341  unsigned long should_use_fast_connect,
342  unsigned long ulUseProfiles);
343 
344 //*****************************************************************************
345 //
375 //
376 //*****************************************************************************
377 
378 
379 extern long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout,
380  unsigned char *ucResults);
381 
382 //*****************************************************************************
383 //
416 //
417 //*****************************************************************************
418 extern long wlan_ioctl_set_scan_params(unsigned long uiEnable, unsigned long
419  uiMinDwellTime,unsigned long uiMaxDwellTime,
420  unsigned long uiNumOfProbeRequests,
421  unsigned long uiChannelMask,
422  long iRSSIThreshold,unsigned long uiSNRThreshold,
423  unsigned long uiDefaultTxPower,
424  unsigned long *aiIntervalList);
425 
426 
427 //*****************************************************************************
428 //
445 //
446 //*****************************************************************************
447 extern long wlan_smart_config_start(unsigned long algoEncryptedFlag);
448 
449 
450 //*****************************************************************************
451 //
461 //
462 //*****************************************************************************
463 extern long wlan_smart_config_stop(void);
464 
465 //*****************************************************************************
466 //
479 //
480 //*****************************************************************************
481 extern long wlan_smart_config_set_prefix(char* cNewPrefix);
482 
483 //*****************************************************************************
484 //
495 //
496 //*****************************************************************************
497 extern long wlan_smart_config_process(void);
498 
499 //*****************************************************************************
500 //
501 // Close the Doxygen group.
503 //
504 //*****************************************************************************
505 
506 
507 
508 //*****************************************************************************
509 //
510 // Mark the end of the C bindings section for C++ compilers.
511 //
512 //*****************************************************************************
513 #ifdef __cplusplus
514 }
515 #endif // __cplusplus
516 
517 #endif // __WLAN_H__