aboutsummaryrefslogtreecommitdiff
path: root/boot.py
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2025-07-20 15:26:58 +0200
committerSébastien Dailly <sebastien@dailly.me>2025-07-20 15:26:58 +0200
commitc31148f482adf44ded7cec1d683e01d995294850 (patch)
tree42dc4032085fc1466bbdeb5bf71076436a3844ef /boot.py
parentcc2c9c0bd9d646a33f0324eae024618bd2a68983 (diff)
Added some tests, and a handle commands in the json (only 'layer' for now)
Diffstat (limited to 'boot.py')
-rw-r--r--boot.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/boot.py b/boot.py
index e1c58e0..3f2dfb2 100644
--- a/boot.py
+++ b/boot.py
@@ -2,9 +2,12 @@ import usb_cdc
usb_cdc.enable(data=True)
import layout
+import storage
if layout.check_key():
print("Key pressed")
+ storage.remount("/", readonly=False)
+ storage.enable_usb_drive()
else:
- import storage
+ # Remount in read only
+ storage.remount("/", readonly=True)
storage.disable_usb_drive()
- storage.remount("/", False)