mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-10-28 17:15:26 +03:00 
			
		
		
		
	update SDK to v1.2.0_15_07_03
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
| //}} | ||||
|   | ||||
							
								
								
									
										47
									
								
								tools/sdk/include/espnow.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								tools/sdk/include/espnow.h
									
									
									
									
									
										Normal 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 | ||||
| @@ -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
									
								
							
							
						
						
									
										34
									
								
								tools/sdk/include/pwm.h
									
									
									
									
									
										Normal 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 | ||||
|  | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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) | ||||
|  */ | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user