Update 'CARDPUTER CircuitPython/boot.py'
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
## FILE OBTAINED FROM: https://github.com/RetiredWizard/PyDOS/blob/main/cpython/boot.py
|
||||
## BECAUSE ! I cannot find anyone else who explains boot.py clearly enough to work for the Cardputer and Circuitpython
|
||||
## *specifically* for writing to the SD card!
|
||||
|
||||
## Minor edits made to comments and print statements for relevance to Cardputer generally
|
||||
|
||||
"""CircuitPython Essentials Storage logging boot.py file"""
|
||||
from sys import implementation
|
||||
import board
|
||||
import digitalio
|
||||
import storage
|
||||
|
||||
# The PyDOS file system will be set to Read/Write status for next
|
||||
# The file system will be set to Read/Write status for next
|
||||
# power cycle unless a control GPIO is grounded (GP2,5 or 6 depending on the Microcontroller)
|
||||
# in which case the host computer will have Read/Write access and PyDOS will have readonly access.
|
||||
|
||||
@@ -47,12 +53,11 @@ if swpin:
|
||||
if switch.value == False:
|
||||
# Mounts so Host computer can write to micro-flash
|
||||
storage.remount("/", True)
|
||||
print("Switch False (pin grounded), PyDOS FS is ReadOnly")
|
||||
print("Switch False (pin grounded), FS is ReadOnly")
|
||||
else:
|
||||
storage.remount("/", False)
|
||||
print("Switch True (not grounded), PyDOS FS is ReadWrite")
|
||||
print("Switch True (not grounded), FS is ReadWrite")
|
||||
|
||||
switch.deinit()
|
||||
else:
|
||||
print("If write access from the host is needed, enter the following PyDOS command:\nfs ro")
|
||||
storage.remount("/", False )
|
||||
Reference in New Issue
Block a user