From 74efe3a9a5783f9fe25be35dd1e270bae71f44ea Mon Sep 17 00:00:00 2001 From: cube Date: Fri, 7 Mar 2025 12:20:14 +0000 Subject: [PATCH] Update 'CARDPUTER CircuitPython/boot.py' --- CARDPUTER CircuitPython/boot.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CARDPUTER CircuitPython/boot.py b/CARDPUTER CircuitPython/boot.py index e2281a6..5b861f9 100644 --- a/CARDPUTER CircuitPython/boot.py +++ b/CARDPUTER CircuitPython/boot.py @@ -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 ) \ No newline at end of file