docs + fs start
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
# deck.fs: FS interaction helpers (WIP)
|
||||
# Created by Luxferre in 2025, released into public domain
|
||||
|
||||
MCU_STORAGE = False
|
||||
try:
|
||||
import storage
|
||||
MCU_STORAGE = True
|
||||
except:
|
||||
pass
|
||||
|
||||
def unlock_rootfs():
|
||||
if MCU_STORAGE:
|
||||
storage.remount("/", readonly=False)
|
||||
|
||||
def lock_rootfs():
|
||||
if MCU_STORAGE:
|
||||
storage.remount("/", readonly=True)
|
||||
+2
-2
@@ -6,8 +6,8 @@ import os
|
||||
from deck.input import input
|
||||
|
||||
# detect terminal size
|
||||
TERM_ROWS = os.getenv('TERM_ROWS', 19)
|
||||
TERM_COLS = os.getenv('TERM_COLS', 53)
|
||||
TERM_ROWS = int(os.getenv('TERM_ROWS', 19))
|
||||
TERM_COLS = int(os.getenv('TERM_COLS', 53))
|
||||
try: # if running on CPython
|
||||
TERM_COLS, TERM_ROWS = os.get_terminal_size()
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user