esp8266/scripts: Move all of initial setup to inisetup module.

This commit is contained in:
Paul Sokolovsky 2016-04-29 20:02:59 +03:00
parent adae53d522
commit d86d65f625
2 changed files with 9 additions and 5 deletions

View File

@ -7,8 +7,4 @@ try:
vfs = uos.VfsFat(bdev, "")
except OSError:
import inisetup
inisetup.check_bootsec()
print("Performing initial setup")
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev, "")
inisetup.wifi()
vfs = inisetup.setup()

View File

@ -30,3 +30,11 @@ factory reprogramming of MicroPython firmware (completely erase flash, followed
by firmware programming).
""")
time.sleep(3)
def setup():
check_bootsec()
print("Performing initial setup")
wifi()
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev, "")
return vfs