?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 32

Line No. Rev Author Line
1 32 kaklik /******************************************************************************
2  
3 MRF24WB0M Driver
4 Module for Microchip TCP/IP Stack
5 -Provides access to MRF24WB0M WiFi controller
6 -Reference: MRF24WB0M Data sheet, IEEE 802.11 Standard
7  
8 *******************************************************************************
9 FileName: WFEasyConfig.h
10 Dependencies: TCP/IP Stack header files
11 Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32
12 Compiler: Microchip C32 v1.10b or higher
13 Microchip C30 v3.22 or higher
14 Microchip C18 v3.34 or higher
15 Company: Microchip Technology, Inc.
16  
17 Software License Agreement
18  
19 Copyright (C) 2002-2010 Microchip Technology Inc. All rights reserved.
20  
21 Microchip licenses to you the right to use, modify, copy, and distribute:
22 (i) the Software when embedded on a Microchip microcontroller or digital
23 signal controller product ("Device") which is integrated into
24 Licensee's product; or
25 (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
26 ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device used in
27 conjunction with a Microchip ethernet controller for the sole purpose
28 of interfacing with the ethernet controller.
29  
30 You should refer to the license agreement accompanying this Software for
31 additional information regarding your rights and obligations.
32  
33 THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
34 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY
35 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
36 NON-INFRINGEMENT. IN NO EVENT SHALL MICROCHIP BE LIABLE FOR ANY INCIDENTAL,
37 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST
38 OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS BY
39 THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), ANY CLAIMS
40 FOR INDEMNITY OR CONTRIBUTION, OR OTHER SIMILAR COSTS, WHETHER ASSERTED ON
41 THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR
42 OTHERWISE.
43  
44  
45 Author Date Comment
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47 Steve Collmeyer 24 Sep 2009 Initial
48 Brad Rex 09 Feb 2010 Update for RoadRunner
49 ******************************************************************************/
50  
51 #ifndef __WFEASYCONFIG_H
52 #define __WFEASYCONFIG_H
53  
54 #include "HardwareProfile.h"
55 #include "TCPIP Stack/TCPIP.h"
56 #include "TCPIPConfig.h"
57  
58 #if defined(EZ_CONFIG_STORE)
59 #include "MainDemo.h"
60 #endif
61  
62 typedef struct
63 {
64 UINT8 configBits; /* used to dictate MAC behavior following the calculation */
65 UINT8 phraseLen; /* number of valid bytes in passphrase */
66 UINT8 ssidLen; /* number of valid bytes in ssid */
67 UINT8 reserved; /* alignment byte */
68 INT8 ssid[32]; /* the string of characters representing the ssid */
69 INT8 passPhrase[64+1]; /* the string of characters representing the pass phrase */
70 } tWFPskCalcReq;
71  
72 typedef enum {
73 cfg_stopped = 0,
74 cfg_stalled,
75 cfg_wait_idle_complete,
76 cfg_max
77 } tWFDynamicConfigStates;
78  
79 typedef struct {
80 BYTE isWifiNeedToConfigure;
81 BYTE isWifiDoneConfigure;
82 BYTE ssid[33]; // 32 for ssid and one for term character
83 tWFNetworkType type; // Net type infrastructure vs adhoc
84 BYTE prevSSID[33]; // previous SSID we were connected to
85 BYTE prevWLAN; // previous WLAN type
86  
87 BYTE security; // security type
88 BYTE defaultWepKey; // WEP index value
89 BYTE key[65]; // 64-byte key plus term character
90  
91 tWFDynamicConfigStates cfg_state;
92 #if defined (EZ_CONFIG_STALL)
93 DWORD timeStart;
94 #endif
95 } tWFEasyConfigCtx;
96  
97 extern tWFEasyConfigCtx g_easyConfigCtx;
98 #define CFGCXT (g_easyConfigCtx)
99  
100 typedef struct
101 {
102 INT8 scanState;
103 UINT16 numScanResults;
104 UINT16 displayIdx;
105 } tWFScanCtx;
106  
107 extern tWFScanCtx g_ScanCtx;
108 #define SCANCXT (g_ScanCtx)
109  
110 /* Easy Config Public Functions */
111 void WFEasyConfigInit(void);
112 void WFEasyConfigMgr(void);
113 void WFInitScan(void);
114  
115 void WFScanEventHandler(UINT16 scanResults);
116  
117 void WFDisplayScanMgr(void);
118  
119 UINT16 WFStartScan(void);
120  
121 UINT16 WFRetrieveScanResult(UINT8 Idx, tWFScanResult *p_ScanResult);
122  
123 /* Macros */
124 #define WF_WEP_KEY_INVALID 0xff
125  
126 #define WF_START_EASY_CONFIG() CFGCXT.isWifiNeedToConfigure = 1;
127  
128 /* Definitions for stall feature of state machine */
129 #define WF_STALL_TIME 1 /* In seconds */
130 #define WF_STALL_TIME_MS (WF_STALL_TIME * TICKS_PER_SECOND)
131  
132 /* Scan status/control bits */
133 #define SCAN_STATE_IN_PROGRESS 0x0001
134 #define SCAN_STATE_VALID_RESULTS 0x0002
135 #define SCAN_STATE_DISPLAY_RESULTS 0x0004
136  
137 #define IS_SCAN_IN_PROGRESS(x) ((x) & SCAN_STATE_IN_PROGRESS)
138 #define IS_SCAN_STATE_VALID(x) ((x) & SCAN_STATE_VALID_RESULTS)
139 #define IS_SCAN_STATE_DISPLAY(x) ((x) & SCAN_STATE_DISPLAY_RESULTS)
140 #define SCAN_SET_IN_PROGRESS(x) ((x) |= SCAN_STATE_IN_PROGRESS)
141 #define SCAN_SET_VALID(x) ((x) |= SCAN_STATE_VALID_RESULTS)
142 #define SCAN_SET_DISPLAY(x) ((x) |= SCAN_STATE_DISPLAY_RESULTS)
143 #define SCAN_CLEAR_IN_PROGRESS(x) ((x) &= ~SCAN_STATE_IN_PROGRESS)
144 #define SCAN_CLEAR_VALID(x) ((x) &= ~SCAN_STATE_VALID_RESULTS)
145 #define SCAN_CLEAR_DISPLAY(x) ((x) &= ~SCAN_STATE_DISPLAY_RESULTS)
146 #endif /* _WFEASYCONFIG_H_ */
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3