aboutsummaryrefslogtreecommitdiff
path: root/boot.py
blob: 3f2dfb2f952284408d074676f4989c86a974b7d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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:
    # Remount in read only
    storage.remount("/", readonly=True)
    storage.disable_usb_drive()