forked from platformio/platformio-core
Add support for ESP8266 // Resolve #119
This commit is contained in:
5
examples/espressif/esp8266-native/src/user_config.h
Normal file
5
examples/espressif/esp8266-native/src/user_config.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#ifndef __USER_CONFIG_H__
|
||||
#define __USER_CONFIG_H__
|
||||
|
||||
#endif
|
||||
|
||||
33
examples/espressif/esp8266-native/src/user_main.c
Normal file
33
examples/espressif/esp8266-native/src/user_main.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user