Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/esp8266/scripts/_boot.py

10 lines
155 B
Python
Raw Normal View History

esp8266: Add Python modules for initial configuration. Main entry point is _boot.py which checks whether FAT FS in flash mountable, and if so, mounts it. Otherwise, it checks if flash is empty, and if so, performs initial module setup: makes FAT FS, configures default AP name, etc. As a last option, if flash is not empty, and could not be mounted, it means filesystem corruption, and warning message with instructions is printed in an infinite loop.
2016-04-12 00:37:04 +03:00
import uos
from flashbdev import bdev
try:
esp8266/scripts: Don't try to create filesystem on 512KB devices or less. There's no space for it.
2016-04-18 17:14:00 +03:00
if bdev:
vfs = uos.VfsFat(bdev, "")
esp8266: Add Python modules for initial configuration. Main entry point is _boot.py which checks whether FAT FS in flash mountable, and if so, mounts it. Otherwise, it checks if flash is empty, and if so, performs initial module setup: makes FAT FS, configures default AP name, etc. As a last option, if flash is not empty, and could not be mounted, it means filesystem corruption, and warning message with instructions is printed in an infinite loop.
2016-04-12 00:37:04 +03:00
except OSError:
import inisetup
esp8266/scripts: Move all of initial setup to inisetup module.
2016-04-29 20:02:59 +03:00
vfs = inisetup.setup()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 32ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API