Skip to content

Commit

Permalink
Update to SDK 1.0.0
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
igrr committed Mar 29, 2015
1 parent cb799b6 commit b64079f
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
19 changes: 17 additions & 2 deletions hardware/tools/esp8266/sdk/include/espconn.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
};

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hardware/tools/esp8266/sdk/include/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 6 additions & 4 deletions hardware/tools/esp8266/sdk/include/smartconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 28 additions & 0 deletions hardware/tools/esp8266/sdk/include/user_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Binary file modified hardware/tools/esp8266/sdk/lib/liblwip.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libmain.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libnet80211.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libphy.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libpp.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libsmartconfig.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libssl.a
Binary file not shown.
Binary file modified hardware/tools/esp8266/sdk/lib/libwpa.a
Binary file not shown.
2 changes: 1 addition & 1 deletion hardware/tools/esp8266/sdk/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.5
1.0.0

0 comments on commit b64079f

Please sign in to comment.