diff --git a/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c b/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c index f3cac6cb4..735466c3a 100644 --- a/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c +++ b/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c @@ -198,7 +198,7 @@ extern void __attachInterrupt(uint8_t pin, voidFuncPtr handler, int mode) } else if (mode == CHANGE) { - gpio_pin_intr_state_set(pin, GPIO_PIN_INTR_ANYEGDE); + gpio_pin_intr_state_set(pin, GPIO_PIN_INTR_ANYEDGE); } else { diff --git a/hardware/tools/esp8266/sdk/include/espconn.h b/hardware/tools/esp8266/sdk/include/espconn.h index e95900791..71718cbe2 100644 --- a/hardware/tools/esp8266/sdk/include/espconn.h +++ b/hardware/tools/esp8266/sdk/include/espconn.h @@ -51,6 +51,7 @@ typedef struct _esp_tcp { espconn_connect_callback connect_callback; espconn_reconnect_callback reconnect_callback; espconn_connect_callback disconnect_callback; + espconn_connect_callback write_finish_fn; } esp_tcp; typedef struct _esp_udp { @@ -88,8 +89,10 @@ struct espconn { }; enum espconn_option{ - ESPCONN_REUSEADDR = 1, - ESPCONN_NODELAY, + ESPCONN_START = 0x00, + ESPCONN_REUSEADDR = 0x01, + ESPCONN_NODELAY = 0x02, + ESPCONN_COPY = 0x04, ESPCONN_END }; @@ -207,6 +210,18 @@ sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_in sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_cb); +/****************************************************************************** + * FunctionName : espconn_regist_sentcb + * Description : Used to specify the function that should be called when data + * has been successfully delivered to the remote host. + * Parameters : espconn -- espconn to set the sent callback + * sent_cb -- sent callback function to call for this espconn + * when data is successfully sent + * Returns : none +*******************************************************************************/ + +sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn); + /****************************************************************************** * FunctionName : espconn_sent * Description : sent data for client or server diff --git a/hardware/tools/esp8266/sdk/include/gpio.h b/hardware/tools/esp8266/sdk/include/gpio.h index cf4e87474..bebd2001b 100644 --- a/hardware/tools/esp8266/sdk/include/gpio.h +++ b/hardware/tools/esp8266/sdk/include/gpio.h @@ -17,7 +17,7 @@ typedef enum { GPIO_PIN_INTR_DISABLE = 0, GPIO_PIN_INTR_POSEDGE = 1, GPIO_PIN_INTR_NEGEDGE = 2, - GPIO_PIN_INTR_ANYEGDE = 3, + GPIO_PIN_INTR_ANYEDGE = 3, GPIO_PIN_INTR_LOLEVEL = 4, GPIO_PIN_INTR_HILEVEL = 5 } GPIO_INT_TYPE; diff --git a/hardware/tools/esp8266/sdk/include/smartconfig.h b/hardware/tools/esp8266/sdk/include/smartconfig.h index 02a1e3174..22b04ff1b 100644 --- a/hardware/tools/esp8266/sdk/include/smartconfig.h +++ b/hardware/tools/esp8266/sdk/include/smartconfig.h @@ -8,21 +8,23 @@ typedef void (*sc_callback_t)(void *data); -typedef enum { - SC_STATUS_FIND_CHANNEL = 0, +typedef enum { + SC_STATUS_WAIT = 0, + SC_STATUS_FIND_CHANNEL, SC_STATUS_GETTING_SSID_PSWD, SC_STATUS_GOT_SSID_PSWD, SC_STATUS_LINK, + SC_STATUS_LINK_OVER, } sc_status; -typedef enum { +typedef enum { SC_TYPE_ESPTOUCH = 0, SC_TYPE_AIRKISS, } sc_type; sc_status smartconfig_get_status(void); const char *smartconfig_get_version(void); -bool smartconfig_start(sc_type type, sc_callback_t cb); +bool smartconfig_start(sc_type type, sc_callback_t cb, ...); bool smartconfig_stop(void); #endif diff --git a/hardware/tools/esp8266/sdk/include/user_interface.h b/hardware/tools/esp8266/sdk/include/user_interface.h index 4f8ab688d..1096832cc 100644 --- a/hardware/tools/esp8266/sdk/include/user_interface.h +++ b/hardware/tools/esp8266/sdk/include/user_interface.h @@ -89,9 +89,27 @@ bool system_rtc_mem_write(uint8 des_addr, const void *src_addr, uint16 save_size void system_uart_swap(void); uint16 system_adc_read(void); +uint16 system_get_vdd33(void); const char *system_get_sdk_version(void); +#define SYS_BOOT_ENHANCE_MODE 0 +#define SYS_BOOT_NORMAL_MODE 1 + +#define SYS_BOOT_NORMAL_BIN 0 +#define SYS_BOOT_TEST_BIN 1 + +uint8 system_get_boot_version(void); +uint32 system_get_userbin_addr(void); +uint8 system_get_boot_mode(void); +bool system_restart_enhance(uint8 bin_type, uint32 bin_addr); + +#define SYS_CPU_80MHZ 80 +#define SYS_CPU_160MHZ 160 + +bool system_update_cpu_freq(uint8 freq); +uint8 system_get_cpu_freq(void); + #define NULL_MODE 0x00 #define STATION_MODE 0x01 #define SOFTAP_MODE 0x02 @@ -107,7 +125,11 @@ typedef enum _auth_mode { } AUTH_MODE; uint8 wifi_get_opmode(void); +uint8 wifi_get_opmode_default(void); bool wifi_set_opmode(uint8 opmode); +bool wifi_set_opmode_current(uint8 opmode); +uint8 wifi_get_broadcast_if(void); +bool wifi_set_broadcast_if(uint8 interface); struct bss_info { STAILQ_ENTRY(bss_info) next; @@ -140,7 +162,9 @@ struct station_config { }; bool wifi_station_get_config(struct station_config *config); +bool wifi_station_get_config_default(struct station_config *config); bool wifi_station_set_config(struct station_config *config); +bool wifi_station_set_config_current(struct station_config *config); bool wifi_station_connect(void); bool wifi_station_disconnect(void); @@ -193,7 +217,9 @@ struct softap_config { }; bool wifi_softap_get_config(struct softap_config *config); +bool wifi_softap_get_config_default(struct softap_config *config); bool wifi_softap_set_config(struct softap_config *config); +bool wifi_softap_set_config_current(struct softap_config *config); struct station_info { STAILQ_ENTRY(station_info) next; @@ -240,6 +266,8 @@ typedef void (* wifi_promiscuous_cb_t)(uint8 *buf, uint16 len); void wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb); +void wifi_promiscuous_set_mac(const uint8_t *address); + enum phy_mode { PHY_MODE_11B = 1, PHY_MODE_11G = 2, diff --git a/hardware/tools/esp8266/sdk/lib/liblwip.a b/hardware/tools/esp8266/sdk/lib/liblwip.a index 6ef795bb5..24fb74c1f 100644 Binary files a/hardware/tools/esp8266/sdk/lib/liblwip.a and b/hardware/tools/esp8266/sdk/lib/liblwip.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libmain.a b/hardware/tools/esp8266/sdk/lib/libmain.a index b0b90f98b..8270c7453 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libmain.a and b/hardware/tools/esp8266/sdk/lib/libmain.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libnet80211.a b/hardware/tools/esp8266/sdk/lib/libnet80211.a index 5ae2da5c5..6d2e52a06 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libnet80211.a and b/hardware/tools/esp8266/sdk/lib/libnet80211.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libphy.a b/hardware/tools/esp8266/sdk/lib/libphy.a index 1598f206f..5702e4ef9 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libphy.a and b/hardware/tools/esp8266/sdk/lib/libphy.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libpp.a b/hardware/tools/esp8266/sdk/lib/libpp.a index 174662057..aa609ad72 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libpp.a and b/hardware/tools/esp8266/sdk/lib/libpp.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libsmartconfig.a b/hardware/tools/esp8266/sdk/lib/libsmartconfig.a index f402b5f3b..1e422ea30 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libsmartconfig.a and b/hardware/tools/esp8266/sdk/lib/libsmartconfig.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libssl.a b/hardware/tools/esp8266/sdk/lib/libssl.a index 36b78fe26..61dc14f7e 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libssl.a and b/hardware/tools/esp8266/sdk/lib/libssl.a differ diff --git a/hardware/tools/esp8266/sdk/lib/libwpa.a b/hardware/tools/esp8266/sdk/lib/libwpa.a index abd611b4f..c536633d8 100644 Binary files a/hardware/tools/esp8266/sdk/lib/libwpa.a and b/hardware/tools/esp8266/sdk/lib/libwpa.a differ diff --git a/hardware/tools/esp8266/sdk/version b/hardware/tools/esp8266/sdk/version index 03834411d..afaf360d3 100644 --- a/hardware/tools/esp8266/sdk/version +++ b/hardware/tools/esp8266/sdk/version @@ -1 +1 @@ -0.9.5 \ No newline at end of file +1.0.0 \ No newline at end of file