Python uos.mount() Examples
The following are 3
code examples of uos.mount().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
uos
, or try the search function
.
Example #1
Source File: inisetup.py From micropython-iot with MIT License | 6 votes |
def setup(): check_bootsec() print("Performing initial setup") uos.VfsLfs2.mkfs(bdev) vfs = uos.VfsLfs2(bdev) uos.mount(vfs, "/") with open("boot.py", "w") as f: f.write( """\ # This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) import uos, machine #uos.dupterm(None, 1) # disable REPL on UART(0) import gc #import webrepl #webrepl.start() gc.collect() """ ) return vfs
Example #2
Source File: epaper.py From micropython-epaper with Apache License 2.0 | 5 votes |
def mountflash(self): if self.flash is None: # Not being used return self.flash.begin() # Initialise. vfs = uos.VfsFat(self.flash) # Instantiate FAT filesystem uos.mount(vfs, self.flash.mountpoint) self.mounted = True
Example #3
Source File: inisetup.py From microhomie with MIT License | 5 votes |
def setup(): check_bootsec() print("Performing initial setup") wifi() uos.VfsFat.mkfs(bdev) vfs = uos.VfsFat(bdev) uos.mount(vfs, '/') with open("boot.py", "w") as f: f.write("""\ # This file is executed on every boot (including wake-boot from deepsleep) import esp esp.osdebug(None) #import uos, machine #uos.dupterm(None, 1) # disable REPL on UART(0) import gc from machine import RTC try: if RTC().memory() == b"webrepl": raise import main import settings from homie.utils import disable_ap disable_ap() except Exception: import webrepl from homie.utils import enable_ap enable_ap() webrepl.start(password="uhomie") gc.collect() """) return vfs