From 30086663f113d262dc40b87af53303740de9a073 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 3 Feb 2015 11:44:46 +0300 Subject: [PATCH] Update to SDK 0.9.5 --- hardware/tools/esp8266/sdk/include/c_types.h | 1 + hardware/tools/esp8266/sdk/include/espconn.h | 69 +++++++++++++ hardware/tools/esp8266/sdk/include/ets_sys.h | 18 +++- hardware/tools/esp8266/sdk/include/ip_addr.h | 5 + hardware/tools/esp8266/sdk/include/osapi.h | 10 +- hardware/tools/esp8266/sdk/include/ping.h | 32 ++++++ .../tools/esp8266/sdk/include/smartconfig.h | 28 +++++ .../tools/esp8266/sdk/include/spi_flash.h | 1 + .../esp8266/sdk/include/user_interface.h | 96 ++++++++++-------- hardware/tools/esp8266/sdk/include/version.h | 12 --- .../tools/esp8266/sdk/ld/eagle.rom.addr.v6.ld | 3 + hardware/tools/esp8266/sdk/lib/liblwip.a | Bin 237096 -> 252524 bytes hardware/tools/esp8266/sdk/lib/libmain.a | Bin 81812 -> 91544 bytes hardware/tools/esp8266/sdk/lib/libnet80211.a | Bin 181154 -> 182492 bytes hardware/tools/esp8266/sdk/lib/libphy.a | Bin 136808 -> 143252 bytes hardware/tools/esp8266/sdk/lib/libpp.a | Bin 157852 -> 172856 bytes .../tools/esp8266/sdk/lib/libsmartconfig.a | Bin 0 -> 67208 bytes hardware/tools/esp8266/sdk/lib/libssl.a | Bin 159214 -> 161570 bytes hardware/tools/esp8266/sdk/lib/libwpa.a | Bin 124372 -> 123520 bytes hardware/tools/esp8266/sdk/version | 2 +- 20 files changed, 215 insertions(+), 62 deletions(-) create mode 100644 hardware/tools/esp8266/sdk/include/ping.h create mode 100644 hardware/tools/esp8266/sdk/include/smartconfig.h delete mode 100644 hardware/tools/esp8266/sdk/include/version.h create mode 100644 hardware/tools/esp8266/sdk/lib/libsmartconfig.a diff --git a/hardware/tools/esp8266/sdk/include/c_types.h b/hardware/tools/esp8266/sdk/include/c_types.h index e6c450cdf..7bc0440de 100644 --- a/hardware/tools/esp8266/sdk/include/c_types.h +++ b/hardware/tools/esp8266/sdk/include/c_types.h @@ -66,6 +66,7 @@ typedef enum { #ifdef ICACHE_FLASH #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text"))) +#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"))) #else #define ICACHE_FLASH_ATTR #endif /* ICACHE_FLASH */ diff --git a/hardware/tools/esp8266/sdk/include/espconn.h b/hardware/tools/esp8266/sdk/include/espconn.h index deabfdce1..e95900791 100644 --- a/hardware/tools/esp8266/sdk/include/espconn.h +++ b/hardware/tools/esp8266/sdk/include/espconn.h @@ -87,6 +87,12 @@ struct espconn { void *reverse; }; +enum espconn_option{ + ESPCONN_REUSEADDR = 1, + ESPCONN_NODELAY, + ESPCONN_END +}; + /****************************************************************************** * FunctionName : espconn_connect * Description : The function given as the connect @@ -132,6 +138,43 @@ sint8 espconn_accept(struct espconn *espconn); sint8 espconn_create(struct espconn *espconn); +/****************************************************************************** + * FunctionName : espconn_tcp_get_max_con + * Description : get the number of simulatenously active TCP connections + * Parameters : none + * Returns : none +*******************************************************************************/ + +uint8 espconn_tcp_get_max_con(void); + +/****************************************************************************** + * FunctionName : espconn_tcp_set_max_con + * Description : set the number of simulatenously active TCP connections + * Parameters : num -- total number + * Returns : none +*******************************************************************************/ + +sint8 espconn_tcp_set_max_con(uint8 num); + +/****************************************************************************** + * FunctionName : espconn_tcp_get_max_con_allow + * Description : get the count of simulatenously active connections on the server + * Parameters : espconn -- espconn to get the count + * Returns : result +*******************************************************************************/ + +sint8 espconn_tcp_get_max_con_allow(struct espconn *espconn); + +/****************************************************************************** + * FunctionName : espconn_tcp_set_max_con_allow + * Description : set the count of simulatenously active connections on the server + * Parameters : espconn -- espconn to set the count + * num -- support the connection number + * Returns : result +*******************************************************************************/ + +sint8 espconn_tcp_set_max_con_allow(struct espconn *espconn, uint8 num); + /****************************************************************************** * FunctionName : espconn_regist_time * Description : used to specify the time that should be called when don't recv data @@ -228,6 +271,16 @@ sint8 espconn_regist_disconcb(struct espconn *espconn, espconn_connect_callback uint32 espconn_port(void); +/****************************************************************************** + * FunctionName : espconn_set_opt + * Description : access port value for client so that we don't end up bouncing + * all connections at the same time . + * Parameters : none + * Returns : access port value +*******************************************************************************/ + +sint8 espconn_set_opt(struct espconn *espconn, uint8 opt); + /****************************************************************************** * TypedefName : dns_found_callback * Description : Callback which is invoked when a hostname is found. @@ -317,5 +370,21 @@ sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip); *******************************************************************************/ sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip); +/****************************************************************************** + * FunctionName : espconn_recv_hold + * Description : hold tcp receive + * Parameters : espconn -- espconn to hold + * Returns : none +*******************************************************************************/ +sint8 espconn_recv_hold(struct espconn *pespconn); + +/****************************************************************************** + * FunctionName : espconn_recv_unhold + * Description : unhold tcp receive + * Parameters : espconn -- espconn to unhold + * Returns : none +*******************************************************************************/ +sint8 espconn_recv_unhold(struct espconn *pespconn); + #endif diff --git a/hardware/tools/esp8266/sdk/include/ets_sys.h b/hardware/tools/esp8266/sdk/include/ets_sys.h index 5b4c62480..2244240af 100644 --- a/hardware/tools/esp8266/sdk/include/ets_sys.h +++ b/hardware/tools/esp8266/sdk/include/ets_sys.h @@ -36,6 +36,10 @@ typedef struct _ETSTIMER_ { } ETSTimer; /* interrupt related */ + +typedef void (*int_handler_t)(void*); + +#define ETS_SPI_INUM 2 #define ETS_GPIO_INUM 4 #define ETS_UART_INUM 5 #define ETS_UART1_INUM 5 @@ -48,13 +52,16 @@ typedef struct _ETSTIMER_ { ets_intr_unlock() #define ETS_FRC_TIMER1_INTR_ATTACH(func, arg) \ - ets_isr_attach(ETS_FRC_TIMER1_INUM, (void *)(func), (void *)(arg)) + ets_isr_attach(ETS_FRC_TIMER1_INUM, (int_handler_t)(func), (void *)(arg)) #define ETS_GPIO_INTR_ATTACH(func, arg) \ - ets_isr_attach(ETS_GPIO_INUM, (void *)(func), (void *)(arg)) + ets_isr_attach(ETS_GPIO_INUM, (int_handler_t)(func), (void *)(arg)) #define ETS_UART_INTR_ATTACH(func, arg) \ - ets_isr_attach(ETS_UART_INUM, (void *)(func), (void *)(arg)) + ets_isr_attach(ETS_UART_INUM, (int_handler_t)(func), (void *)(arg)) + +#define ETS_SPI_INTR_ATTACH(func, arg) \ + ets_isr_attach(ETS_SPI_INUM, (int_handler_t)(func), (void *)(arg)) #define ETS_INTR_ENABLE(inum) \ ets_isr_unmask((1<