1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Update to SDK 1.0.0

Fixes #1
This commit is contained in:
Ivan Grokhotkov
2015-03-30 00:50:24 +03:00
parent cb799b670d
commit b64079f539
14 changed files with 54 additions and 9 deletions

View File

@ -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
{

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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,

View File

@ -1 +1 @@
0.9.5
1.0.0