parent
852cb815b2
commit
221901e98c
|
@ -15,8 +15,6 @@ dist/
|
||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
var/
|
var/
|
||||||
|
@ -138,3 +136,8 @@ dmypy.json
|
||||||
# Cython debug symbols
|
# Cython debug symbols
|
||||||
cython_debug/
|
cython_debug/
|
||||||
|
|
||||||
|
boot_out.txt
|
||||||
|
.metadata_never_index
|
||||||
|
/System Volume Information
|
||||||
|
.fseventsd
|
||||||
|
.Trashes
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
from board import *
|
||||||
|
import digitalio
|
||||||
|
import storage
|
||||||
|
|
||||||
|
noStorageStatus = False
|
||||||
|
noStoragePin = digitalio.DigitalInOut(GP15)
|
||||||
|
noStoragePin.switch_to_input(pull=digitalio.Pull.UP)
|
||||||
|
noStorageStatus = not noStoragePin.value
|
||||||
|
|
||||||
|
if(noStorageStatus == True):
|
||||||
|
# don't show USB drive to host PC
|
||||||
|
storage.disable_usb_drive()
|
||||||
|
print("Disabling USB drive")
|
||||||
|
else:
|
||||||
|
# normal boot
|
||||||
|
print("USB drive enabled")
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue