mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Update to SDK 1.3.0
This commit is contained in:
@ -24,7 +24,7 @@ typedef void (* espconn_reconnect_callback)(void *arg, sint8 err);
|
||||
#define ESPCONN_ISCONN -15 /* Already connected. */
|
||||
|
||||
#define ESPCONN_HANDSHAKE -28 /* ssl handshake failed */
|
||||
#define ESPCONN_PROTO_MSG -61 /* ssl application invalid */
|
||||
#define ESPCONN_SSL_INVALID_DATA -61 /* ssl application invalid */
|
||||
|
||||
/** Protocol family and type of the espconn */
|
||||
enum espconn_type {
|
||||
@ -267,6 +267,17 @@ sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_
|
||||
|
||||
sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn);
|
||||
|
||||
/******************************************************************************
|
||||
* FunctionName : espconn_send
|
||||
* Description : sent data for client or server
|
||||
* Parameters : espconn -- espconn to set for client or server
|
||||
* psent -- data to send
|
||||
* length -- length of data to send
|
||||
* Returns : none
|
||||
*******************************************************************************/
|
||||
|
||||
sint8 espconn_send(struct espconn *espconn, uint8 *psent, uint16 length);
|
||||
|
||||
/******************************************************************************
|
||||
* FunctionName : espconn_sent
|
||||
* Description : sent data for client or server
|
||||
@ -426,6 +437,17 @@ sint8 espconn_secure_connect(struct espconn *espconn);
|
||||
|
||||
sint8 espconn_secure_disconnect(struct espconn *espconn);
|
||||
|
||||
/******************************************************************************
|
||||
* FunctionName : espconn_secure_send
|
||||
* Description : sent data for client or server
|
||||
* Parameters : espconn -- espconn to set for client or server
|
||||
* psent -- data to send
|
||||
* length -- length of data to send
|
||||
* Returns : none
|
||||
*******************************************************************************/
|
||||
|
||||
sint8 espconn_secure_send(struct espconn *espconn, uint8 *psent, uint16 length);
|
||||
|
||||
/******************************************************************************
|
||||
* FunctionName : espconn_encry_sent
|
||||
* Description : sent data for client or server
|
||||
|
@ -13,12 +13,16 @@ enum esp_now_role {
|
||||
ESP_NOW_ROLE_MAX,
|
||||
};
|
||||
|
||||
typedef void (*esp_now_cb_t)(u8 *mac_addr, u8 *data, u8 len);
|
||||
typedef void (*esp_now_recv_cb_t)(u8 *mac_addr, u8 *data, u8 len);
|
||||
typedef void (*esp_now_send_cb_t)(u8 *mac_addr, u8 status);
|
||||
|
||||
int esp_now_init(void);
|
||||
int esp_now_deinit(void);
|
||||
|
||||
int esp_now_register_recv_cb(esp_now_cb_t cb);
|
||||
int esp_now_register_send_cb(esp_now_send_cb_t cb);
|
||||
int esp_now_unregister_send_cb(void);
|
||||
|
||||
int esp_now_register_recv_cb(esp_now_recv_cb_t cb);
|
||||
int esp_now_unregister_recv_cb(void);
|
||||
|
||||
int esp_now_send(u8 *da, u8 *data, int len);
|
||||
@ -44,4 +48,6 @@ int esp_now_is_peer_exist(u8 *mac_addr);
|
||||
|
||||
int esp_now_get_cnt_info(u8 *all_cnt, u8 *encrypt_cnt);
|
||||
|
||||
int esp_now_set_kok(u8 *key, u8 len);
|
||||
|
||||
#endif
|
||||
|
@ -23,7 +23,7 @@ typedef enum {
|
||||
} GPIO_INT_TYPE;
|
||||
|
||||
#define GPIO_OUTPUT_SET(gpio_no, bit_value) \
|
||||
gpio_output_set(bit_value<<gpio_no, ((~bit_value)&0x01)<<gpio_no, 1<<gpio_no,0)
|
||||
gpio_output_set((bit_value)<<gpio_no, ((~(bit_value))&0x01)<<gpio_no, 1<<gpio_no,0)
|
||||
#define GPIO_DIS_OUTPUT(gpio_no) gpio_output_set(0,0,0, 1<<gpio_no)
|
||||
#define GPIO_INPUT_GET(gpio_no) ((gpio_input_get()>>gpio_no)&BIT0)
|
||||
|
||||
|
0
tools/sdk/include/json/json.h
Executable file → Normal file
0
tools/sdk/include/json/json.h
Executable file → Normal file
0
tools/sdk/include/json/jsonparse.h
Executable file → Normal file
0
tools/sdk/include/json/jsonparse.h
Executable file → Normal file
0
tools/sdk/include/json/jsontree.h
Executable file → Normal file
0
tools/sdk/include/json/jsontree.h
Executable file → Normal file
5
tools/sdk/include/upgrade.h
Executable file → Normal file
5
tools/sdk/include/upgrade.h
Executable file → Normal file
@ -2,6 +2,7 @@
|
||||
#define __UPGRADE_H__
|
||||
|
||||
#define SPI_FLASH_SEC_SIZE 4096
|
||||
#define LIMIT_ERASE_SIZE 0x10000
|
||||
|
||||
#define USER_BIN1 0x00
|
||||
#define USER_BIN2 0x01
|
||||
@ -37,14 +38,12 @@ struct upgrade_server_info {
|
||||
#define UPGRADE_FLAG_START 0x01
|
||||
#define UPGRADE_FLAG_FINISH 0x02
|
||||
|
||||
//bool system_upgrade_start(struct upgrade_server_info *server);
|
||||
bool system_upgrade_start_ssl(struct upgrade_server_info *server);
|
||||
void system_upgrade_init();
|
||||
void system_upgrade_deinit();
|
||||
bool system_upgrade(uint8 *data, uint16 len);
|
||||
|
||||
#ifdef UPGRADE_SSL_ENABLE
|
||||
bool system_upgrade_start_ssl(struct upgrade_server_info *server);
|
||||
bool system_upgrade_start_ssl(struct upgrade_server_info *server); // not supported now
|
||||
#else
|
||||
bool system_upgrade_start(struct upgrade_server_info *server);
|
||||
#endif
|
||||
|
@ -28,10 +28,11 @@ enum rst_reason {
|
||||
REASON_EXCEPTION_RST = 2,
|
||||
REASON_SOFT_WDT_RST = 3,
|
||||
REASON_SOFT_RESTART = 4,
|
||||
REASON_DEEP_SLEEP_AWAKE = 5
|
||||
REASON_DEEP_SLEEP_AWAKE = 5,
|
||||
REASON_EXT_SYS_RST = 6
|
||||
};
|
||||
|
||||
struct rst_info {
|
||||
struct rst_info{
|
||||
uint32 reason;
|
||||
uint32 exccause;
|
||||
uint32 epc1;
|
||||
@ -137,6 +138,7 @@ 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);
|
||||
void system_soft_wdt_feed(void);
|
||||
|
||||
#define NULL_MODE 0x00
|
||||
#define STATION_MODE 0x01
|
||||
@ -283,6 +285,7 @@ void wifi_softap_free_station_info(void);
|
||||
bool wifi_softap_dhcps_start(void);
|
||||
bool wifi_softap_dhcps_stop(void);
|
||||
bool wifi_softap_set_dhcps_lease(struct dhcps_lease *please);
|
||||
bool wifi_softap_get_dhcps_lease(struct dhcps_lease *please);
|
||||
enum dhcp_status wifi_softap_dhcps_status(void);
|
||||
bool wifi_softap_set_dhcps_offer_option(uint8 level, void* optarg);
|
||||
|
||||
@ -430,17 +433,18 @@ typedef enum wps_type {
|
||||
WPS_TYPE_MAX
|
||||
} WPS_TYPE_t;
|
||||
|
||||
typedef enum wps_cb_status {
|
||||
enum wps_cb_status {
|
||||
WPS_CB_ST_SUCCESS = 0,
|
||||
WPS_CB_ST_FAILED,
|
||||
WPS_CB_ST_TIMEOUT
|
||||
} WPS_CB_STATUS_t;
|
||||
WPS_CB_ST_TIMEOUT,
|
||||
WPS_CB_ST_WEP,
|
||||
};
|
||||
|
||||
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)(WPS_CB_STATUS_t status);
|
||||
typedef void (*wps_st_cb_t)(int status);
|
||||
bool wifi_set_wps_cb(wps_st_cb_t cb);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user