aboutsummaryrefslogtreecommitdiff
path: root/boot.py
blob: 1aa21e53b102acbc75a352e3d396fedb1d5906ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import usb_cdc
import layout
import storage

usb_cdc.enable(data=True)

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()