Add support for ESP8266 // Resolve #119

This commit is contained in:
Valeriy Koval
2015-04-09 18:50:03 +03:00
parent 9b3ca7ee0b
commit 181959f1de
7 changed files with 126 additions and 29 deletions

View File

@@ -0,0 +1,5 @@
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#endif

View File

@@ -0,0 +1,33 @@
/******************************************************************************
* Copyright 2013-2014 Espressif Systems (Wuxi)
*
* FileName: user_main.c
*
* Description: entry file of user application
*
* Modification history:
* 2014/1/1, v1.0 create this file.
*******************************************************************************/
#include "ets_sys.h"
#include "osapi.h"
#include "user_interface.h"
#include "smartconfig.h"
void ICACHE_FLASH_ATTR
smartconfig_done(void *data)
{
struct station_config *sta_conf = data;
wifi_station_set_config(sta_conf);
wifi_station_disconnect();
wifi_station_connect();
}
void user_init(void)
{
os_printf("SDK version:%s\n", system_get_sdk_version());
wifi_set_opmode(STATION_MODE);
smartconfig_start(SC_TYPE_AIRKISS, smartconfig_done);
}