1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

update SDK to v1.2.0_15_07_03

This commit is contained in:
Markus Sattler 2015-07-04 09:45:05 +02:00 committed by Ivan Grokhotkov
parent 39883f5ea8
commit d4ddb66fc4
27 changed files with 193 additions and 15 deletions

View File

@ -81,18 +81,25 @@ EspClass ESP;
void EspClass::wdtEnable(uint32_t timeout_ms)
{
/// This API can only be called if software watchdog is stopped
system_soft_wdt_restart();
}
void EspClass::wdtEnable(WDTO_t timeout_ms)
{
wdtEnable((uint32_t) timeout_ms);
}
void EspClass::wdtDisable(void)
{
/// Please dont stop software watchdog too long (less than 6 seconds),
/// otherwise it will trigger hardware watchdog reset.
system_soft_wdt_stop();
}
void EspClass::wdtFeed(void)
{
}
void EspClass::deepSleep(uint32_t time_us, WakeMode mode)

View File

@ -599,7 +599,7 @@ void ESP8266WiFiClass::beginSmartConfig()
_smartConfigDone = false;
//SC_TYPE_ESPTOUCH use ESPTOUCH for smartconfig, or use SC_TYPE_AIRKISS for AIRKISS
smartconfig_start(SC_TYPE_ESPTOUCH, reinterpret_cast<sc_callback_t>(&ESP8266WiFiClass::_smartConfigCallback), 1);
smartconfig_start(reinterpret_cast<sc_callback_t>(&ESP8266WiFiClass::_smartConfigCallback), 1);
}
void ESP8266WiFiClass::stopSmartConfig()

View File

@ -24,7 +24,7 @@ compiler.S.flags=-c -g -x assembler-with-cpp -MMD
compiler.c.elf.flags=-g -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{build.flash_ld}" -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig
compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig -lwps
compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD

View File

@ -1,3 +1,62 @@
esp_iot_sdk_v1.2.0_15_07_03 Release Note
-------------------------------------------
Resolved IssuesBugs below are eligible for Bug Bounty Program):
1.TLS server disconnect to ESP8266 may cause crash. [孙新虎]
Optimization:
1.Update SmartConfig to version 2.4 , corresponding to ESPTOUCH APP v0.3.4 (https://github.com/EspressifApp/), delete parameter "sc_type type" in smartconfig_start, SmartConfig type can be got automatically.
2.Add parameter "sint16 freq_offset; " in structure "bss_info" to get AP's frequency offset.
3.Folder "ld" is updated, please use the latest one (\esp_iot_sdk_v1.2.0\ld )
4.Add UDP transparent transmission example in documentation "4B-ESP8266__AT Command Examples"
5.Revise the scan issue that may cause Wi-Fi connection break.
6.Add ESP-NOW function, more details in "Add APIs"
7.Add WPS function,more details in "Add APIs"
8.Fixed a DNS fail issue with special router
9.Optimize espconn,revise issues below:
(1) enter sent callback late in UDP transmission
(2) TCP shakehand may fail issue
(3) SSL connection fail may cause crash
(4) optimize SSL error handler
10. Memory optimization
Add APIs:
1.ESP-NOW APIs
esp_now_init: init ESP-NOW function
esp_now_deinit: deinit ESP-NOW function
esp_now_register_recv_cb: register ESP-NOW receive callback
esp_now_unregister_recv_cb: unregister ESP-NOW receive callback
esp_now_send: send ESP-NOW packet
esp_now_add_peer: add an ESP-NOW peer
esp_now_del_peer: delete an ESP-NOW peer
esp_now_set_self_role: set ESP-NOW role of device itself
esp_now_get_self_role: get ESP-NOW role of device itself
esp_now_set_peer_role: set ESP-NOW role about another device
esp_now_get_peer_role: get ESP-NOW role about another device
esp_now_set_peer_key: set ESP-NOW key of a device
esp_now_get_peer_key: get ESP-NOW key of a device
2. WPS APIs
wifi_wps_enable : enable WPS function
wifi_wps_disable: disable WPS function
wifi_wps_start: start WPS communication
wifi_set_wps_cb: set WPS callback
3.software watchdog APIs
system_soft_wdt_stop: stop software watchdog
system_soft_wdt_restart: restart software watchdog
4.sntp_get_timezone: get SNTP timezone
AT_v0.30 Release Note:
Note: For AT firmware to support FOTA, flash size need to be 1024KB or more than that.
1.Command "AT+CWSTARTSMART" need not parameter any more, SmartConfig type can be got automatically.
2.AP's frequency offset can be got by command "AT+CWLAP"
3.Memory optimization
esp_iot_sdk_1.1.2_15_06_25_p2 Release Note
-------------------------------------------

View File

@ -300,11 +300,11 @@
#define PIN_PULLUP_DIS(PIN_NAME) CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)
#define PIN_PULLUP_EN(PIN_NAME) SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLUP)
#define PIN_PULLDWN_DIS(PIN_NAME) CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
#define PIN_PULLDWN_EN(PIN_NAME) SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
#define PIN_FUNC_SELECT(PIN_NAME, FUNC) do { \
CLEAR_PERI_REG_MASK(PIN_NAME, (PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)); \
SET_PERI_REG_MASK(PIN_NAME, (((FUNC&BIT2)<<2)|(FUNC&0x3))<<PERIPHS_IO_MUX_FUNC_S); \
WRITE_PERI_REG(PIN_NAME, \
READ_PERI_REG(PIN_NAME) \
& (~(PERIPHS_IO_MUX_FUNC<<PERIPHS_IO_MUX_FUNC_S)) \
|( (((FUNC&BIT2)<<2)|(FUNC&0x3))<<PERIPHS_IO_MUX_FUNC_S) ); \
} while (0)
//}}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2015 -2018 Espressif System
*
*/
#ifndef __ESPNOW_H__
#define __ESPNOW_H__
enum esp_now_role {
ESP_NOW_ROLE_IDLE = 0,
ESP_NOW_ROLE_CONTROLLER,
ESP_NOW_ROLE_SLAVE,
ESP_NOW_ROLE_MAX,
};
typedef void (*esp_now_cb_t)(u8 *mac_addr, u8 *data, u8 len);
int esp_now_init(void);
int esp_now_deinit(void);
int esp_now_register_recv_cb(esp_now_cb_t cb);
int esp_now_unregister_recv_cb(void);
int esp_now_send(u8 *da, u8 *data, int len);
int esp_now_add_peer(u8 *mac_addr, u8 role, u8 channel, u8 *key, u8 key_len);
int esp_now_del_peer(u8 *mac_addr);
int esp_now_set_self_role(u8 role);
int esp_now_get_self_role(void);
int esp_now_set_peer_role(u8 *mac_addr, u8 role);
int esp_now_get_peer_role(u8 *mac_addr);
int esp_now_set_peer_channel(u8 *mac_addr, u8 channel);
int esp_now_get_peer_channel(u8 *mac_addr);
int esp_now_set_peer_key(u8 *mac_addr, u8 *key, u8 key_len);
int esp_now_get_peer_key(u8 *mac_addr, u8 *key, u8 *key_len);
u8 *esp_now_fetch_peer(bool restart);
int esp_now_is_peer_exist(u8 *mac_addr);
int esp_now_get_cnt_info(u8 *all_cnt, u8 *encrypt_cnt);
#endif

View File

@ -91,13 +91,6 @@ inline uint32_t ETS_INTR_PENDING(void)
#define ETS_FRC_TIMER1_NMI_INTR_ATTACH(func) \
NmiTimSetFunc(func)
#define ETS_FRC1_INTR_ENABLE() \
ETS_INTR_ENABLE(ETS_FRC_TIMER1_INUM)
#define ETS_FRC1_INTR_DISABLE() \
ETS_INTR_DISABLE(ETS_FRC_TIMER1_INUM)
#define ETS_GPIO_INTR_ATTACH(func, arg) \
ets_isr_attach(ETS_GPIO_INUM, (int_handler_t)(func), (void *)(arg))
@ -117,6 +110,12 @@ inline uint32_t ETS_INTR_PENDING(void)
#define ETS_UART_INTR_DISABLE() \
ETS_INTR_DISABLE(ETS_UART_INUM)
#define ETS_FRC1_INTR_ENABLE() \
ETS_INTR_ENABLE(ETS_FRC_TIMER1_INUM)
#define ETS_FRC1_INTR_DISABLE() \
ETS_INTR_DISABLE(ETS_FRC_TIMER1_INUM)
#define ETS_SPI_INTR_ATTACH(func, arg) \
ets_isr_attach(ETS_SPI_INUM, (int_handler_t)(func), (void *)(arg))

34
tools/sdk/include/pwm.h Normal file
View File

@ -0,0 +1,34 @@
#ifndef __PWM_H__
#define __PWM_H__
/*pwm.h: function and macro definition of PWM API , driver level */
/*user_light.h: user interface for light API, user level*/
/*user_light_adj: API for color changing and lighting effects, user level*/
/*NOTE!! : DO NOT CHANGE THIS FILE*/
/*SUPPORT UP TO 8 PWM CHANNEL*/
#define PWM_CHANNEL_NUM_MAX 8
struct pwm_param {
uint32 period;
uint32 freq;
uint32 duty[PWM_CHANNEL_NUM_MAX]; //PWM_CHANNEL<=8
};
/* pwm_init should be called only once, for now */
void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]);
void pwm_start(void);
void pwm_set_duty(uint32 duty, uint8 channel);
uint32 pwm_get_duty(uint8 channel);
void pwm_set_period(uint32 period);
uint32 pwm_get_period(void);
uint32 get_pwm_version(void);
void set_pwm_debug_en(uint8 print_en);
#endif

View File

@ -22,7 +22,7 @@ typedef enum {
typedef void (*sc_callback_t)(sc_status status, void *pdata);
const char *smartconfig_get_version(void);
bool smartconfig_start(sc_type type, sc_callback_t cb, ...);
bool smartconfig_start(sc_callback_t cb, ...);
bool smartconfig_stop(void);
bool esptouch_set_timeout(uint8 time_s); //15s~255s, offset:45s

View File

@ -15,6 +15,10 @@ uint32 sntp_get_current_timestamp();
* get real time (GTM + 8 time zone)
*/
char* sntp_get_real_time(long t);
/**
* SNTP get time_zone default GMT + 8
*/
sint8 sntp_get_timezone(void);
/**
* SNTP set time_zone (default GMT + 8)
*/

View File

@ -135,6 +135,9 @@ void system_phy_set_rfoption(uint8 option);
bool system_param_save_with_protect(uint16 start_sec, void *param, uint16 len);
bool system_param_load(uint16 start_sec, uint16 offset, void *param, uint16 len);
void system_soft_wdt_stop(void);
void system_soft_wdt_restart(void);
#define NULL_MODE 0x00
#define STATION_MODE 0x01
#define SOFTAP_MODE 0x02
@ -165,6 +168,7 @@ struct bss_info {
sint8 rssi;
AUTH_MODE authmode;
uint8 is_hidden;
sint16 freq_offset;
};
typedef struct _scaninfo {
@ -235,6 +239,9 @@ bool wifi_station_dhcpc_start(void);
bool wifi_station_dhcpc_stop(void);
enum dhcp_status wifi_station_dhcpc_status(void);
char* wifi_station_get_hostname(void);
bool wifi_station_set_hostname(char *name);
struct softap_config {
uint8 ssid[32];
uint8 password[64];
@ -415,4 +422,25 @@ typedef void (* wifi_event_handler_cb_t)(System_Event_t *event);
void wifi_set_event_handler_cb(wifi_event_handler_cb_t cb);
typedef enum wps_type {
WPS_TYPE_DISABLE = 0,
WPS_TYPE_PBC,
WPS_TYPE_PIN,
WPS_TYPE_DISPLAY,
WPS_TYPE_MAX,
} WPS_TYPE_t;
enum wps_cb_status {
WPS_CB_ST_SUCCESS = 0,
WPS_CB_ST_FAILED,
WPS_CB_ST_TIMEOUT,
};
bool wifi_wps_enable(WPS_TYPE_t wps_type);
bool wifi_wps_disable(void);
bool wifi_wps_start(void);
typedef void (*wps_st_cb_t)(int status);
bool wifi_set_wps_cb(wps_st_cb_t cb);
#endif

BIN
tools/sdk/lib/libat.a Normal file

Binary file not shown.

BIN
tools/sdk/lib/libcrypto.a Normal file

Binary file not shown.

BIN
tools/sdk/lib/libespnow.a Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tools/sdk/lib/liblwip_536.a Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tools/sdk/lib/libpwm.a Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tools/sdk/lib/libwps.a Normal file

Binary file not shown.

View File

@ -1 +1 @@
1.1.2_15_06_25_p2
1.2.0_15_07_03