Skip to content

Commit ec59372

Browse files
author
Alexander Sologub
committed
Update SDK to 2.0.0 (#2304)
1 parent 7900132 commit ec59372

29 files changed

+137
-1
lines changed

cores/esp8266/core_esp8266_main.cpp

+32-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct rst_info resetInfo;
4343

4444
extern "C" {
4545
extern const uint32_t __attribute__((section(".ver_number"))) core_version = ARDUINO_ESP8266_GIT_VER;
46-
const char* core_release =
46+
const char* core_release =
4747
#ifdef ARDUINO_ESP8266_RELEASE
4848
ARDUINO_ESP8266_RELEASE;
4949
#else
@@ -171,3 +171,34 @@ extern "C" void user_init(void) {
171171

172172
system_init_done_cb(&init_done);
173173
}
174+
175+
extern "C" uint32 ICACHE_FLASH_ATTR user_rf_cal_sector_set(void) {
176+
enum flash_size_map size_map = system_get_flash_size_map();
177+
uint32 rf_cal_sec = 0;
178+
179+
switch (size_map) {
180+
case FLASH_SIZE_4M_MAP_256_256:
181+
rf_cal_sec = 128 - 5;
182+
break;
183+
184+
case FLASH_SIZE_8M_MAP_512_512:
185+
rf_cal_sec = 256 - 5;
186+
break;
187+
188+
case FLASH_SIZE_16M_MAP_512_512:
189+
case FLASH_SIZE_16M_MAP_1024_1024:
190+
rf_cal_sec = 512 - 5;
191+
break;
192+
193+
case FLASH_SIZE_32M_MAP_512_512:
194+
case FLASH_SIZE_32M_MAP_1024_1024:
195+
rf_cal_sec = 1024 - 5;
196+
break;
197+
198+
default:
199+
rf_cal_sec = 0;
200+
break;
201+
}
202+
203+
return rf_cal_sec;
204+
}

tools/sdk/include/c_types.h

+9
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@
1010
#include <stdarg.h>
1111
#include <sys/cdefs.h>
1212

13+
typedef unsigned char uint8_t;
1314
typedef signed char sint8_t;
15+
typedef signed char int8_t;
16+
typedef unsigned short uint16_t;
1417
typedef signed short sint16_t;
18+
typedef signed short int16_t;
19+
typedef unsigned int uint32_t;
1520
typedef signed long sint32_t;
21+
typedef signed int int32_t;
1622
typedef signed long long sint64_t;
23+
typedef unsigned long long uint64_t;
1724
typedef unsigned long long u_int64_t;
1825
typedef float real32_t;
1926
typedef double real64_t;
@@ -41,6 +48,8 @@ typedef double real64;
4148

4249
#define __le16 u16
4350

51+
typedef unsigned int size_t;
52+
4453
#define LOCAL static
4554

4655
#ifndef NULL

tools/sdk/include/eagle_soc.h

+5
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@
173173
//RTC reg {{
174174
#define REG_RTC_BASE PERIPHS_RTC_BASEADDR
175175

176+
#define RTC_STORE0 (REG_RTC_BASE + 0x030)
177+
#define RTC_STORE1 (REG_RTC_BASE + 0x034)
178+
#define RTC_STORE2 (REG_RTC_BASE + 0x038)
179+
#define RTC_STORE3 (REG_RTC_BASE + 0x03C)
180+
176181
#define RTC_GPIO_OUT (REG_RTC_BASE + 0x068)
177182
#define RTC_GPIO_ENABLE (REG_RTC_BASE + 0x074)
178183
#define RTC_GPIO_IN_DATA (REG_RTC_BASE + 0x08C)

tools/sdk/include/espnow.h

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ enum esp_now_role {
1010
ESP_NOW_ROLE_IDLE = 0,
1111
ESP_NOW_ROLE_CONTROLLER,
1212
ESP_NOW_ROLE_SLAVE,
13+
ESP_NOW_ROLE_COMBO,
1314
ESP_NOW_ROLE_MAX,
1415
};
1516

tools/sdk/include/simple_pair.h

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright (C) 2015 -2018 Espressif System
3+
*
4+
*/
5+
6+
#ifndef __SIMPLE_PAIR_H__
7+
#define __SIMPLE_PAIR_H__
8+
9+
typedef enum {
10+
SP_ST_STA_FINISH = 0,
11+
SP_ST_AP_FINISH = 0,
12+
SP_ST_AP_RECV_NEG,
13+
SP_ST_STA_AP_REFUSE_NEG,
14+
/* all following is err */
15+
SP_ST_WAIT_TIMEOUT,
16+
SP_ST_SEND_ERROR,
17+
SP_ST_KEY_INSTALL_ERR,
18+
SP_ST_KEY_OVERLAP_ERR, //means the same macaddr has two different keys
19+
SP_ST_OP_ERROR,
20+
SP_ST_UNKNOWN_ERROR,
21+
SP_ST_MAX,
22+
} SP_ST_t;
23+
24+
25+
typedef void (*simple_pair_status_cb_t)(u8 *sa, u8 status);
26+
27+
int register_simple_pair_status_cb(simple_pair_status_cb_t cb);
28+
void unregister_simple_pair_status_cb(void);
29+
30+
int simple_pair_init(void);
31+
void simple_pair_deinit(void);
32+
33+
int simple_pair_state_reset(void);
34+
int simple_pair_ap_enter_announce_mode(void);
35+
int simple_pair_sta_enter_scan_mode(void);
36+
37+
int simple_pair_sta_start_negotiate(void);
38+
int simple_pair_ap_start_negotiate(void);
39+
int simple_pair_ap_refuse_negotiate(void);
40+
41+
int simple_pair_set_peer_ref(u8 *peer_mac, u8 *tmp_key, u8 *ex_key);
42+
int simple_pair_get_peer_ref(u8 *peer_mac, u8 *tmp_key, u8 *ex_key);
43+
44+
45+
#endif /* __SIMPLE_PAIR_H__ */

tools/sdk/include/user_interface.h

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "queue.h"
1717
#include "user_config.h"
1818
#include "spi_flash.h"
19+
#include "gpio.h"
1920

2021
#ifndef MAC2STR
2122
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
@@ -178,6 +179,7 @@ typedef struct bss_info {
178179
sint16 freq_offset;
179180
sint16 freqcal_val;
180181
uint8 *esp_mesh_ie;
182+
uint8 simple_pair;
181183
} bss_info_t;
182184

183185
typedef struct _scaninfo {
@@ -605,4 +607,7 @@ bool wifi_set_user_ie(bool enable, uint8 *m_oui, uint8 type, uint8 *user_ie, uin
605607
int wifi_register_user_ie_manufacturer_recv_cb(user_ie_manufacturer_recv_cb_t cb);
606608
void wifi_unregister_user_ie_manufacturer_recv_cb(void);
607609

610+
void wifi_enable_gpio_wakeup(uint32 i, GPIO_INT_TYPE intr_status);
611+
void wifi_disable_gpio_wakeup(void);
612+
608613
#endif

tools/sdk/include/wpa2_enterprise.h

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ifndef __WPA2_ENTERPRISE_H__
2+
#define __WPA2_ENTERPRISE_H__
3+
4+
typedef long os_time_t;
5+
6+
struct os_time {
7+
os_time_t sec;
8+
os_time_t usec;
9+
};
10+
11+
typedef int (* get_time_func_t)(struct os_time *t);
12+
13+
int wifi_station_set_wpa2_enterprise_auth(int enable);
14+
15+
int wifi_station_set_enterprise_cert_key(u8 *client_cert, int client_cert_len,
16+
u8 *private_key, int private_key_len,
17+
u8 *private_key_passwd, int private_key_passwd_len);
18+
void wifi_station_clear_enterprise_cert_key(void);
19+
20+
int wifi_station_set_enterprise_ca_cert(u8 *ca_cert, int ca_cert_len);
21+
void wifi_station_clear_enterprise_ca_cert(void);
22+
23+
int wifi_station_set_enterprise_username(u8 *username, int len);
24+
void wifi_station_clear_enterprise_username(void);
25+
26+
int wifi_station_set_enterprise_password(u8 *password, int len);
27+
void wifi_station_clear_enterprise_password(void);
28+
29+
int wifi_station_set_enterprise_new_password(u8 *new_password, int len);
30+
void wifi_station_clear_enterprise_new_password(void);
31+
32+
void wifi_station_set_enterprise_disable_time_check(bool disable);
33+
bool wifi_station_get_enterprise_disable_time_check(void);
34+
35+
void wpa2_enterprise_set_user_get_time(get_time_func_t cb);
36+
37+
38+
#endif /* __WPA2_ENTERPRISE_H__ */

tools/sdk/ld/eagle.app.v6.common.ld

+1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ SECTIONS
162162
*libgcc.a:_umoddi3.o(.literal .text)
163163
*libgcc.a:_udivdi3.o(.literal .text)
164164
*libsmartconfig.a:(.literal .text .literal.* .text.*)
165+
*libmbedtls.a:(.literal .text .literal.* .text.*)
165166
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text .irom.text.*)
166167
_irom0_text_end = ABSOLUTE(.);
167168
_flash_code_end = ABSOLUTE(.);

tools/sdk/ld/eagle.rom.addr.v6.ld

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ PROVIDE ( SPI_read_status = 0x400043c8 );
2020
PROVIDE ( SPI_write_status = 0x40004400 );
2121
PROVIDE ( SPI_write_enable = 0x4000443c );
2222
PROVIDE ( Wait_SPI_Idle = 0x4000448c );
23+
PROVIDE ( Enable_QMode = 0x400044c0 );
2324
PROVIDE ( SPIEraseArea = 0x40004b44 );
2425
PROVIDE ( SPIEraseBlock = 0x400049b4 );
2526
PROVIDE ( SPIEraseChip = 0x40004984 );

tools/sdk/lib/libairkiss.a

100644100755
File mode changed.

tools/sdk/lib/libat.a

100644100755
35.6 KB
Binary file not shown.

tools/sdk/lib/libcrypto.a

100644100755
22.9 KB
Binary file not shown.

tools/sdk/lib/libdriver.a

65.3 KB
Binary file not shown.

tools/sdk/lib/libespnow.a

100644100755
23.2 KB
Binary file not shown.

tools/sdk/lib/libgcc.a

587 KB
Binary file not shown.

tools/sdk/lib/libjson.a

100644100755
0 Bytes
Binary file not shown.

tools/sdk/lib/liblwip.a

100644100755
14 KB
Binary file not shown.

tools/sdk/lib/liblwip_536.a

345 KB
Binary file not shown.

tools/sdk/lib/libmain.a

100644100755
17.3 KB
Binary file not shown.

tools/sdk/lib/libmesh.a

100644100755
0 Bytes
Binary file not shown.

tools/sdk/lib/libnet80211.a

100644100755
12.5 KB
Binary file not shown.

tools/sdk/lib/libphy.a

-1.16 KB
Binary file not shown.

tools/sdk/lib/libpp.a

100644100755
3.62 KB
Binary file not shown.

tools/sdk/lib/libsmartconfig.a

100644100755
0 Bytes
Binary file not shown.

tools/sdk/lib/libssl.a

100644100755
-620 Bytes
Binary file not shown.

tools/sdk/lib/libupgrade.a

100644100755
0 Bytes
Binary file not shown.

tools/sdk/lib/libwpa.a

100644100755
92 Bytes
Binary file not shown.

tools/sdk/lib/libwpa2.a

100644100755
93.1 KB
Binary file not shown.

tools/sdk/lib/libwps.a

100644100755
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)