-
Notifications
You must be signed in to change notification settings - Fork 28
/
sdk.h
663 lines (589 loc) · 15.1 KB
/
sdk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
#ifndef _sdk_h_
#define _sdk_h_
#include "attribute.h"
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
#include <sys/types.h>
enum
{
SPI_FLASH_SEC_SIZE = 4096,
};
typedef enum
{
SPI_FLASH_RESULT_OK,
SPI_FLASH_RESULT_ERR,
SPI_FLASH_RESULT_TIMEOUT,
} SpiFlashOpResult;
typedef enum
{
GPIO_PIN_INTR_DISABLE = 0,
GPIO_PIN_INTR_POSEDGE = 1,
GPIO_PIN_INTR_NEGEDGE = 2,
GPIO_PIN_INTR_ANYEDGE = 3,
GPIO_PIN_INTR_LOLEVEL = 4,
GPIO_PIN_INTR_HILEVEL = 5,
} GPIO_INT_TYPE;
typedef enum
{
SYSTEM_PARTITION_INVALID = 0,
SYSTEM_PARTITION_BOOTLOADER,
SYSTEM_PARTITION_OTA_1,
SYSTEM_PARTITION_OTA_2,
SYSTEM_PARTITION_RF_CAL,
SYSTEM_PARTITION_PHY_DATA,
SYSTEM_PARTITION_SYSTEM_PARAMETER,
SYSTEM_PARTITION_AT_PARAMETER,
SYSTEM_PARTITION_SSL_CLIENT_CERT_PRIVKEY,
SYSTEM_PARTITION_SSL_CLIENT_CA,
SYSTEM_PARTITION_SSL_SERVER_CERT_PRIVKEY,
SYSTEM_PARTITION_SSL_SERVER_CA,
SYSTEM_PARTITION_WPA2_ENTERPRISE_CERT_PRIVKEY,
SYSTEM_PARTITION_WPA2_ENTERPRISE_CA,
SYSTEM_PARTITION_CUSTOMER_BEGIN = 100,
SYSTEM_PARTITION_MAX
} partition_type_t;
typedef struct
{
partition_type_t type;
uint32_t addr;
uint32_t size;
} partition_item_t;
enum flash_size_map
{
FLASH_SIZE_4M_MAP_256_256 = 0,
FLASH_SIZE_2M,
FLASH_SIZE_8M_MAP_512_512,
FLASH_SIZE_16M_MAP_512_512,
FLASH_SIZE_32M_MAP_512_512,
FLASH_SIZE_16M_MAP_1024_1024,
FLASH_SIZE_32M_MAP_1024_1024,
FLASH_SIZE_32M_MAP_2048_2048,
FLASH_SIZE_64M_MAP_1024_1024,
FLASH_SIZE_128M_MAP_1024_1024,
};
enum rst_reason
{
REASON_DEFAULT_RST = 0,
REASON_WDT_RST,
REASON_EXCEPTION_RST,
REASON_SOFT_WDT_RST,
REASON_SOFT_RESTART,
REASON_DEEP_SLEEP_AWAKE,
REASON_EXT_SYS_RST,
};
struct rst_info
{
enum rst_reason reason;
uint32_t exccause;
uint32_t epc1;
uint32_t epc2;
uint32_t epc3;
uint32_t excvaddr;
uint32_t depc;
};
typedef enum
{
OK = 0,
FAIL,
PENDING,
BUSY,
CANCEL,
} STATUS;
typedef enum _auth_mode
{
AUTH_OPEN = 0,
AUTH_WEP,
AUTH_WPA_PSK,
AUTH_WPA2_PSK,
AUTH_WPA_WPA2_PSK,
AUTH_MAX
} AUTH_MODE;
typedef enum _cipher_type
{
CIPHER_NONE = 0,
CIPHER_WEP40,
CIPHER_WEP104,
CIPHER_TKIP,
CIPHER_CCMP,
CIPHER_TKIP_CCMP,
CIPHER_UNKNOWN,
} CIPHER_TYPE;
enum
{
STATION_IDLE = 0,
STATION_CONNECTING,
STATION_WRONG_PASSWORD,
STATION_NO_AP_FOUND,
STATION_CONNECT_FAIL,
STATION_GOT_IP
};
enum
{
NULL_MODE = 0,
STATION_MODE,
SOFTAP_MODE,
STATIONAP_MODE,
};
struct bss_info
{
struct
{
struct bss_info *stqe_next;
} next;
uint8_t bssid[6];
uint8_t ssid[32];
uint8_t ssid_len;
uint8_t channel;
int8_t rssi;
AUTH_MODE authmode;
uint8_t is_hidden;
int16_t freq_offset;
int16_t freqcal_val;
uint8_t *esp_mesh_ie;
uint8_t simple_pair;
CIPHER_TYPE pairwise_cipher;
CIPHER_TYPE group_cipher;
unsigned int phy_11b:1;
unsigned int phy_11g:1;
unsigned int phy_11n:1;
unsigned int wps:1;
unsigned int reserved:28;
};
struct softap_config
{
char ssid[32];
char password[64];
uint8_t ssid_len;
uint8_t channel;
AUTH_MODE authmode; // don't support AUTH_WEP in softAP mode
uint8_t ssid_hidden; // default 0
uint8_t max_connection; // default 4, max 4
uint16_t beacon_interval; // support 100 ~ 60000 ms, default 100
};
typedef enum
{
WIFI_SCAN_TYPE_ACTIVE = 0,
WIFI_SCAN_TYPE_PASSIVE,
} wifi_scan_type_t;
typedef struct
{
uint32_t min; // units: millisecond, values above 1500ms may cause station to disconnect from AP and are not recommended.
uint32_t max;
} wifi_active_scan_time_t;
typedef union
{
wifi_active_scan_time_t active;
uint32_t passive; // units: millisecond, values above 1500ms may cause station to disconnect from AP and are not recommended.
} wifi_scan_time_t;
struct scan_config
{
char *ssid; // ssid == NULL, don't filter ssid.
char *bssid; // bssid == NULL, don't filter bssid.
uint8_t channel; // channel == 0, scan all channels, otherwise scan set channel.
uint8_t show_hidden; // show_hidden == 1, can get hidden ssid routers' info.
wifi_scan_type_t scan_type; // scan type, active or passive
wifi_scan_time_t scan_time; // scan time per channel
};
typedef struct
{
int8_t rssi;
AUTH_MODE authmode;
} wifi_fast_scan_threshold_t;
struct station_config
{
uint8_t ssid[32];
uint8_t password[64];
uint8_t channel;
uint8_t bssid_set; // if bssid_set is 1, station will just connect to the router with both ssid[] and bssid[] matched.
uint8_t bssid[6];
wifi_fast_scan_threshold_t threshold;
uint8_t open_and_wep_mode_disable; // can connect to open/wep router by default.
uint8_t all_channel_scan;
};
typedef void (*scan_done_cb_t)(void *arg, STATUS status);
typedef struct {
char cc[3];
uint8_t schan;
uint8_t nchan;
uint8_t policy;
} wifi_country_t;
enum phy_mode
{
PHY_MODE_11B = 1,
PHY_MODE_11G = 2,
PHY_MODE_11N = 3
};
enum sleep_type
{
NONE_SLEEP_T = 0,
LIGHT_SLEEP_T,
MODEM_SLEEP_T
};
enum sleep_level
{
MIN_SLEEP_T,
MAX_SLEEP_T
};
enum
{
STATION_IF = 0,
SOFTAP_IF,
};
enum
{
WLAN_STATE_INIT = 0,
WLAN_STATE_AUTH = 2,
WLAN_STATE_ASSOC = 3,
WLAN_STATE_RUN = 5,
};
enum
{
USER_TASK_PRIO_0 = 0,
USER_TASK_PRIO_1,
USER_TASK_PRIO_2,
USER_TASK_PRIO_MAX
};
typedef uint8_t sdk_mac_addr_t[6];
enum dhcp_status
{
DHCP_STOPPED = 0,
DHCP_STARTED
};
enum dhcps_offer_option
{
OFFER_START = 0,
OFFER_ROUTER,
OFFER_END
};
struct dhcps_lease
{
bool enable;
struct ip_addr start_ip;
struct ip_addr end_ip;
};
typedef struct
{
uint32_t sig;
uint32_t par;
} os_event_t;
enum
{
EVENT_STAMODE_CONNECTED = 0,
EVENT_STAMODE_DISCONNECTED,
EVENT_STAMODE_AUTHMODE_CHANGE,
EVENT_STAMODE_GOT_IP,
EVENT_STAMODE_DHCP_TIMEOUT,
EVENT_SOFTAPMODE_STACONNECTED,
EVENT_SOFTAPMODE_STADISCONNECTED,
EVENT_SOFTAPMODE_PROBEREQRECVED,
EVENT_OPMODE_CHANGED,
EVENT_SOFTAPMODE_DISTRIBUTE_STA_IP,
EVENT_MAX,
};
enum
{
REASON_DUMMY_1 = 0,
REASON_UNSPECIFIED,
REASON_AUTH_EXPIRE,
REASON_AUTH_LEAVE,
REASON_ASSOC_EXPIRE,
REASON_ASSOC_TOOMANY,
REASON_NOT_AUTHED,
REASON_NOT_ASSOCED,
REASON_ASSOC_LEAVE,
REASON_ASSOC_NOT_AUTHED,
REASON_DISASSOC_PWRCAP_BAD,
REASON_DISASSOC_SUPCHAN_BAD,
REASON_DUMMY_2,
REASON_IE_INVALID,
REASON_MIC_FAILURE,
REASON_4WAY_HANDSHAKE_TIMEOUT,
REASON_GROUP_KEY_UPDATE_TIMEOUT,
REASON_IE_IN_4WAY_DIFFERS,
REASON_GROUP_CIPHER_INVALID,
REASON_PAIRWISE_CIPHER_INVALID,
REASON_AKMP_INVALID,
REASON_UNSUPP_RSN_IE_VERSION,
REASON_INVALID_RSN_IE_CAP,
REASON_802_1X_AUTH_FAILED,
REASON_CIPHER_SUITE_REJECTED,
REASON_BEACON_TIMEOUT = 200,
REASON_NO_AP_FOUND,
REASON_AUTH_FAIL,
REASON_ASSOC_FAIL,
REASON_HANDSHAKE_TIMEOUT,
};
enum RATE_11B_ID
{
RATE_11B_B11M = 0,
RATE_11B_B5M = 1,
RATE_11B_B2M = 2,
RATE_11B_B1M = 3,
};
enum RATE_11G_ID
{
RATE_11G_G54M = 0,
RATE_11G_G48M = 1,
RATE_11G_G36M = 2,
RATE_11G_G24M = 3,
RATE_11G_G18M = 4,
RATE_11G_G12M = 5,
RATE_11G_G9M = 6,
RATE_11G_G6M = 7,
RATE_11G_B5M = 8,
RATE_11G_B2M = 9,
RATE_11G_B1M = 10,
};
enum RATE_11N_ID
{
RATE_11N_MCS7S = 0,
RATE_11N_MCS7 = 1,
RATE_11N_MCS6 = 2,
RATE_11N_MCS5 = 3,
RATE_11N_MCS4 = 4,
RATE_11N_MCS3 = 5,
RATE_11N_MCS2 = 6,
RATE_11N_MCS1 = 7,
RATE_11N_MCS0 = 8,
RATE_11N_B5M = 9,
RATE_11N_B2M = 10,
RATE_11N_B1M = 11,
};
enum
{
RC_LIMIT_11B = 0,
RC_LIMIT_11G = 1,
RC_LIMIT_11N = 2,
};
enum support_rate
{
sr_RATE_11B5M = 0,
sr_RATE_11B11M = 1,
sr_RATE_11B1M = 2,
sr_RATE_11B2M = 3,
sr_RATE_11G6M = 4,
sr_RATE_11G12M = 5,
sr_RATE_11G24M = 6,
sr_RATE_11G48M = 7,
sr_RATE_11G54M = 8,
sr_RATE_11G9M = 9,
sr_RATE_11G18M = 10,
sr_RATE_11G36M = 11,
};
enum FIXED_RATE
{
PHY_RATE_48 = 0x08,
PHY_RATE_24 = 0x09,
PHY_RATE_12 = 0x0a,
PHY_RATE_6 = 0x0b,
PHY_RATE_54 = 0x0c,
PHY_RATE_36 = 0x0d,
PHY_RATE_18 = 0x0e,
PHY_RATE_9 = 0x0f,
};
enum
{
FIXED_RATE_MASK_NONE = 0x00,
FIXED_RATE_MASK_STA = 0x01,
FIXED_RATE_MASK_AP = 0x02,
FIXED_RATE_MASK_ALL = 0x03,
};
typedef struct
{
char ssid[32];
uint8_t ssid_len;
char bssid[6];
uint8_t channel;
} Event_StaMode_Connected_t;
typedef struct
{
char ssid[32];
uint8_t ssid_len;
char bssid[6];
uint8_t reason;
} Event_StaMode_Disconnected_t;
typedef struct
{
uint8_t old_mode;
uint8_t new_mode;
} Event_StaMode_AuthMode_Change_t;
struct ip_info
{
struct ip_addr ip;
struct ip_addr netmask;
struct ip_addr gw;
};
typedef struct ip_info Event_StaMode_Got_IP_t;
typedef struct
{
sdk_mac_addr_t mac;
uint8_t aid;
} Event_SoftAPMode_StaConnected_t;
typedef struct
{
sdk_mac_addr_t mac;
struct ip_addr ip;
uint8_t aid;
} Event_SoftAPMode_Distribute_Sta_IP_t;
typedef struct
{
sdk_mac_addr_t mac;
uint8_t aid;
} Event_SoftAPMode_StaDisconnected_t;
typedef struct
{
int rssi;
sdk_mac_addr_t mac;
} Event_SoftAPMode_ProbeReqRecved_t;
typedef struct
{
uint8_t old_opmode;
uint8_t new_opmode;
} Event_OpMode_Change_t;
typedef union
{
Event_StaMode_Connected_t connected;
Event_StaMode_Disconnected_t disconnected;
Event_StaMode_AuthMode_Change_t auth_change;
Event_StaMode_Got_IP_t got_ip;
Event_SoftAPMode_StaConnected_t sta_connected;
Event_SoftAPMode_Distribute_Sta_IP_t distribute_sta_ip;
Event_SoftAPMode_StaDisconnected_t sta_disconnected;
Event_SoftAPMode_ProbeReqRecved_t ap_probereqrecved;
Event_OpMode_Change_t opmode_changed;
} Event_Info_u;
typedef struct _esp_event
{
uint32_t event;
Event_Info_u event_info;
} System_Event_t;
typedef void (*wifi_event_handler_cb_t)(System_Event_t *event);
struct ETSEventTag
{
uint32_t sig;
uint32_t par;
};
typedef void ETSTimerFunc(void *);
typedef struct ETSEventTag ETSEvent;
typedef void (*os_task_t)(ETSEvent *);
typedef struct _ETSTIMER_ {
struct _ETSTIMER_ *timer_next;
uint32_t timer_expire;
uint32_t timer_period;
ETSTimerFunc *timer_func;
void *timer_arg;
} os_timer_t;
typedef void (*init_done_cb_t)(void);
typedef struct {
uint32_t i[2];
uint32_t buf[4];
unsigned char in[64];
unsigned char digest[16];
} MD5_CTX;
typedef struct {
unsigned int h0, h1, h2, h3, h4;
unsigned int Nl, Nh;
unsigned int data[16];
unsigned int num;
} SHA_CTX;
attr_nonnull int MD5Init(MD5_CTX *context);
attr_nonnull int MD5Update(MD5_CTX *context, const void *, unsigned int length);
attr_nonnull int MD5Final(unsigned char *hash, MD5_CTX *context);
attr_nonnull int SHA1Init(SHA_CTX *context);
attr_nonnull int SHA1Update(SHA_CTX *context, const void *, unsigned int length);
attr_nonnull int SHA1Final(unsigned char *md, SHA_CTX *context);
int ets_memcmp(const void *, const void *, unsigned int);
void * ets_memcpy(void *, const void *, unsigned int);
uint16_t system_adc_read(void);
uint32_t system_get_chip_id(void);
uint8_t system_get_cpu_freq(void);
enum flash_size_map system_get_flash_size_map(void);
const char * system_get_sdk_version(void);
struct rst_info* system_get_rst_info(void);
uint32_t system_get_rtc_time(void);
uint32_t system_get_time(void);
void system_init_done_cb(init_done_cb_t);
bool system_partition_get_item(partition_type_t type, partition_item_t* partition_item);
bool system_partition_table_regist(const partition_item_t *partition_table, uint32_t partition_num, uint32_t map);
void system_print_meminfo(void);
bool system_os_post(uint8_t, uint32_t, uint32_t);
bool system_os_task(os_task_t, uint8_t, os_event_t *, uint8_t);
bool system_rtc_mem_read(uint8_t, void *, uint16_t);
bool system_rtc_mem_write(uint8_t, const void *, uint16_t);
void system_restart(void);
void system_restart_local(void); // skip ap/sta disconnect
void system_restart_core(void);
void system_restore(void);
void system_set_os_print(uint8_t onoff);
void system_phy_set_powerup_option(uint8_t);
uint32_t system_rtc_clock_cali_proc(void);
void system_soft_wdt_feed(void);
bool system_update_cpu_freq(uint8_t);
void ets_delay_us(uint32_t);
void ets_install_putc1(void (*)(char));
void ets_timer_setfn(os_timer_t *, ETSTimerFunc *, void *);
void ets_timer_arm_new(os_timer_t *, uint32_t, bool, bool);
void ets_timer_disarm(os_timer_t *);
attr_inline void os_delay_us(uint32_t s) { ets_delay_us(s); }
attr_inline void os_install_putc1(void (*p)(char)) { ets_install_putc1(p); }
attr_inline void os_timer_setfn(os_timer_t *ptimer, ETSTimerFunc *pfunction, void *parg) { ets_timer_setfn(ptimer, pfunction, parg); }
attr_inline void os_timer_arm(os_timer_t *ptimer, uint32_t time, bool repeat_flag) { ets_timer_arm_new(ptimer, time, repeat_flag, 0); }
attr_inline void os_timer_disarm(os_timer_t *ptimer) { ets_timer_disarm(ptimer); }
uint32_t os_random(void);
uint32_t spi_flash_get_id(void);
SpiFlashOpResult spi_flash_erase_sector(uint16_t);
SpiFlashOpResult spi_flash_write(uint32_t, const void * attr_flash_align, uint32_t);
SpiFlashOpResult spi_flash_read(uint32_t, void * attr_flash_align, uint32_t);
bool wifi_get_country(wifi_country_t *);
uint8_t wifi_get_channel(void);
bool wifi_get_ip_info(uint8_t if_index, struct ip_info *);
uint8_t wifi_get_listen_interval(void);
bool wifi_get_macaddr(uint8_t if_index, sdk_mac_addr_t);
uint8_t wifi_get_opmode(void);
enum phy_mode wifi_get_phy_mode(void);
enum sleep_level wifi_get_sleep_level(void);
enum sleep_type wifi_get_sleep_type(void);
void wifi_set_event_handler_cb(wifi_event_handler_cb_t);
bool wifi_set_ip_info(uint8_t index, struct ip_info *info);
bool wifi_set_listen_interval(uint8_t interval);
bool wifi_set_opmode(uint8_t opmode);
bool wifi_set_opmode_current(uint8_t);
bool wifi_set_phy_mode(enum phy_mode mode);
bool wifi_set_sleep_level(enum sleep_level);
bool wifi_set_sleep_type(enum sleep_type);
int wifi_set_user_fixed_rate(uint8_t enable_mask, uint8_t rate);
bool wifi_set_user_rate_limit(uint8_t mode, uint8_t ifidx, uint8_t max, uint8_t min);
int wifi_set_user_sup_rate(uint8_t min, uint8_t max);
enum dhcp_status wifi_softap_dhcps_status(void);
uint32_t wifi_softap_get_dhcps_lease_time(void);
bool wifi_softap_get_dhcps_lease(struct dhcps_lease *);
bool wifi_softap_reset_dhcps_lease_time(void);
bool wifi_softap_set_dhcps_offer_option(uint8_t, void *);
bool wifi_softap_set_dhcps_lease_time(uint32_t);
bool wifi_softap_set_config_current(struct softap_config *);
bool wifi_softap_set_dhcps_lease(struct dhcps_lease *);
bool wifi_station_ap_number_set(uint8_t);
bool wifi_station_connect(void);
bool wifi_station_dhcpc_stop(void);
bool wifi_station_disconnect(void);
uint8_t wifi_station_get_ap_info(struct station_config []);
uint8_t wifi_station_get_auto_connect(void);
uint8_t wifi_station_get_current_ap_id(void);
bool wifi_station_get_config_default(struct station_config *);
bool wifi_station_get_config(struct station_config *);
int8_t wifi_station_get_rssi(void);
uint8_t wifi_station_get_connect_status(void);
bool wifi_station_scan(struct scan_config *config, scan_done_cb_t);
bool wifi_station_set_auto_connect(uint8_t);
bool wifi_station_set_config(struct station_config *);
bool wifi_station_set_config_current(struct station_config *);
bool wifi_station_set_reconnect_policy(bool);
void gpio_init(void);
void gpio_pin_intr_state_set(uint32_t, GPIO_INT_TYPE);
void * pvPortMalloc(size_t sz, const char *, unsigned, bool);
void * pvPortCalloc(size_t count, size_t size, const char *, unsigned);
void vPortFree(void *p, const char *, unsigned);
void * pvPortRealloc(void *p, size_t n, const char *, unsigned);
unsigned int xPortGetFreeHeapSize();
#endif