Skip to content

Commit de29a7c

Browse files
committed
Merge remote-tracking branch 'upstream/esp8266'
2 parents 1d253c6 + b64079f commit de29a7c

16 files changed

+62
-14
lines changed

esp8266com/esp8266/cores/esp8266/cbuf.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,23 @@ class cbuf
6060
return _begin == _end;
6161
}
6262

63-
char peek()
63+
int peek()
6464
{
6565
if (_end == _begin)
6666
return -1;
6767

68-
return *_begin;
68+
return static_cast<int>(*_begin);
6969
}
7070

71-
char read()
71+
int read()
7272
{
7373
if (getSize() == 0)
7474
return -1;
7575

7676
char result = *_begin;
7777
if (++_begin == _bufend)
7878
_begin = _buf;
79-
return result;
79+
return static_cast<int>(result);
8080
}
8181

8282
size_t read(char* dst, size_t size)

esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ extern void __attachInterrupt(uint8_t pin, voidFuncPtr handler, int mode)
198198
}
199199
else if (mode == CHANGE)
200200
{
201-
gpio_pin_intr_state_set(pin, GPIO_PIN_INTR_ANYEGDE);
201+
gpio_pin_intr_state_set(pin, GPIO_PIN_INTR_ANYEDGE);
202202
}
203203
else
204204
{

esp8266com/esp8266/platform.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH "-I{compiler.sdk.path}/inc
1717
compiler.c.cmd=xtensa-lx106-elf-gcc
1818
compiler.c.flags=-c -Os -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -MMD -std=c99
1919

20+
compiler.S.cmd=xtensa-lx106-elf-gcc
21+
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
22+
2023
compiler.c.elf.ldscript=eagle.app.v6.ld
2124
compiler.c.elf.flags=-nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{compiler.c.elf.ldscript}"
2225
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
@@ -57,7 +60,7 @@ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
5760
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
5861

5962
## Compile S files
60-
recipe.S.o.pattern="{compiler.path}{compiler.as.cmd}" -o "{object_file}" "{source_file}"
63+
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
6164

6265
## Create archives
6366
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"

esp8266com/esp8266/sdk/include/espconn.h

+17-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ typedef struct _esp_tcp {
5151
espconn_connect_callback connect_callback;
5252
espconn_reconnect_callback reconnect_callback;
5353
espconn_connect_callback disconnect_callback;
54+
espconn_connect_callback write_finish_fn;
5455
} esp_tcp;
5556

5657
typedef struct _esp_udp {
@@ -88,8 +89,10 @@ struct espconn {
8889
};
8990

9091
enum espconn_option{
91-
ESPCONN_REUSEADDR = 1,
92-
ESPCONN_NODELAY,
92+
ESPCONN_START = 0x00,
93+
ESPCONN_REUSEADDR = 0x01,
94+
ESPCONN_NODELAY = 0x02,
95+
ESPCONN_COPY = 0x04,
9396
ESPCONN_END
9497
};
9598

@@ -207,6 +210,18 @@ sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_in
207210

208211
sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_cb);
209212

213+
/******************************************************************************
214+
* FunctionName : espconn_regist_sentcb
215+
* Description : Used to specify the function that should be called when data
216+
* has been successfully delivered to the remote host.
217+
* Parameters : espconn -- espconn to set the sent callback
218+
* sent_cb -- sent callback function to call for this espconn
219+
* when data is successfully sent
220+
* Returns : none
221+
*******************************************************************************/
222+
223+
sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn);
224+
210225
/******************************************************************************
211226
* FunctionName : espconn_sent
212227
* Description : sent data for client or server

esp8266com/esp8266/sdk/include/gpio.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef enum {
1717
GPIO_PIN_INTR_DISABLE = 0,
1818
GPIO_PIN_INTR_POSEDGE = 1,
1919
GPIO_PIN_INTR_NEGEDGE = 2,
20-
GPIO_PIN_INTR_ANYEGDE = 3,
20+
GPIO_PIN_INTR_ANYEDGE = 3,
2121
GPIO_PIN_INTR_LOLEVEL = 4,
2222
GPIO_PIN_INTR_HILEVEL = 5
2323
} GPIO_INT_TYPE;

esp8266com/esp8266/sdk/include/smartconfig.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,23 @@
88

99
typedef void (*sc_callback_t)(void *data);
1010

11-
typedef enum {
12-
SC_STATUS_FIND_CHANNEL = 0,
11+
typedef enum {
12+
SC_STATUS_WAIT = 0,
13+
SC_STATUS_FIND_CHANNEL,
1314
SC_STATUS_GETTING_SSID_PSWD,
1415
SC_STATUS_GOT_SSID_PSWD,
1516
SC_STATUS_LINK,
17+
SC_STATUS_LINK_OVER,
1618
} sc_status;
1719

18-
typedef enum {
20+
typedef enum {
1921
SC_TYPE_ESPTOUCH = 0,
2022
SC_TYPE_AIRKISS,
2123
} sc_type;
2224

2325
sc_status smartconfig_get_status(void);
2426
const char *smartconfig_get_version(void);
25-
bool smartconfig_start(sc_type type, sc_callback_t cb);
27+
bool smartconfig_start(sc_type type, sc_callback_t cb, ...);
2628
bool smartconfig_stop(void);
2729

2830
#endif

esp8266com/esp8266/sdk/include/user_interface.h

+28
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,27 @@ bool system_rtc_mem_write(uint8 des_addr, const void *src_addr, uint16 save_size
8989
void system_uart_swap(void);
9090

9191
uint16 system_adc_read(void);
92+
uint16 system_get_vdd33(void);
9293

9394
const char *system_get_sdk_version(void);
9495

96+
#define SYS_BOOT_ENHANCE_MODE 0
97+
#define SYS_BOOT_NORMAL_MODE 1
98+
99+
#define SYS_BOOT_NORMAL_BIN 0
100+
#define SYS_BOOT_TEST_BIN 1
101+
102+
uint8 system_get_boot_version(void);
103+
uint32 system_get_userbin_addr(void);
104+
uint8 system_get_boot_mode(void);
105+
bool system_restart_enhance(uint8 bin_type, uint32 bin_addr);
106+
107+
#define SYS_CPU_80MHZ 80
108+
#define SYS_CPU_160MHZ 160
109+
110+
bool system_update_cpu_freq(uint8 freq);
111+
uint8 system_get_cpu_freq(void);
112+
95113
#define NULL_MODE 0x00
96114
#define STATION_MODE 0x01
97115
#define SOFTAP_MODE 0x02
@@ -107,7 +125,11 @@ typedef enum _auth_mode {
107125
} AUTH_MODE;
108126

109127
uint8 wifi_get_opmode(void);
128+
uint8 wifi_get_opmode_default(void);
110129
bool wifi_set_opmode(uint8 opmode);
130+
bool wifi_set_opmode_current(uint8 opmode);
131+
uint8 wifi_get_broadcast_if(void);
132+
bool wifi_set_broadcast_if(uint8 interface);
111133

112134
struct bss_info {
113135
STAILQ_ENTRY(bss_info) next;
@@ -140,7 +162,9 @@ struct station_config {
140162
};
141163

142164
bool wifi_station_get_config(struct station_config *config);
165+
bool wifi_station_get_config_default(struct station_config *config);
143166
bool wifi_station_set_config(struct station_config *config);
167+
bool wifi_station_set_config_current(struct station_config *config);
144168

145169
bool wifi_station_connect(void);
146170
bool wifi_station_disconnect(void);
@@ -193,7 +217,9 @@ struct softap_config {
193217
};
194218

195219
bool wifi_softap_get_config(struct softap_config *config);
220+
bool wifi_softap_get_config_default(struct softap_config *config);
196221
bool wifi_softap_set_config(struct softap_config *config);
222+
bool wifi_softap_set_config_current(struct softap_config *config);
197223

198224
struct station_info {
199225
STAILQ_ENTRY(station_info) next;
@@ -240,6 +266,8 @@ typedef void (* wifi_promiscuous_cb_t)(uint8 *buf, uint16 len);
240266

241267
void wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb);
242268

269+
void wifi_promiscuous_set_mac(const uint8_t *address);
270+
243271
enum phy_mode {
244272
PHY_MODE_11B = 1,
245273
PHY_MODE_11G = 2,

esp8266com/esp8266/sdk/lib/liblwip.a

3.48 KB
Binary file not shown.

esp8266com/esp8266/sdk/lib/libmain.a

13.8 KB
Binary file not shown.
740 Bytes
Binary file not shown.

esp8266com/esp8266/sdk/lib/libphy.a

1.34 KB
Binary file not shown.

esp8266com/esp8266/sdk/lib/libpp.a

5.46 KB
Binary file not shown.
17.9 KB
Binary file not shown.

esp8266com/esp8266/sdk/lib/libssl.a

196 Bytes
Binary file not shown.

esp8266com/esp8266/sdk/lib/libwpa.a

-544 Bytes
Binary file not shown.

esp8266com/esp8266/sdk/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.5
1+
1.0.0

0 commit comments

Comments
 (0)