Преглед изворни кода

Update 'CARDPUTER CircuitPython/boot.py'

cube пре 9 месеци
родитељ
комит
74efe3a9a5
1 измењених фајлова са 9 додато и 4 уклоњено
  1. 9
    4
      CARDPUTER CircuitPython/boot.py

+ 9
- 4
CARDPUTER CircuitPython/boot.py Прегледај датотеку

1
+## FILE OBTAINED FROM: https://github.com/RetiredWizard/PyDOS/blob/main/cpython/boot.py
2
+## BECAUSE ! I cannot find anyone else who explains boot.py clearly enough to work for the Cardputer and Circuitpython
3
+## *specifically* for writing to the SD card!
4
+
5
+## Minor edits made to comments and print statements for relevance to Cardputer generally
6
+
1
 """CircuitPython Essentials Storage logging boot.py file"""
7
 """CircuitPython Essentials Storage logging boot.py file"""
2
 from sys import implementation
8
 from sys import implementation
3
 import board
9
 import board
4
 import digitalio
10
 import digitalio
5
 import storage
11
 import storage
6
 
12
 
7
-# The PyDOS file system will be set to Read/Write status for next
13
+# The file system will be set to Read/Write status for next
8
 # power cycle unless a control GPIO is grounded (GP2,5 or 6 depending on the Microcontroller)
14
 # power cycle unless a control GPIO is grounded (GP2,5 or 6 depending on the Microcontroller)
9
 # in which case the host computer will have Read/Write access and PyDOS will have readonly access.
15
 # in which case the host computer will have Read/Write access and PyDOS will have readonly access.
10
 
16
 
47
     if switch.value == False:
53
     if switch.value == False:
48
         # Mounts so Host computer can write to micro-flash
54
         # Mounts so Host computer can write to micro-flash
49
         storage.remount("/", True)
55
         storage.remount("/", True)
50
-        print("Switch False (pin grounded), PyDOS FS is ReadOnly")
56
+        print("Switch False (pin grounded), FS is ReadOnly")
51
     else:
57
     else:
52
         storage.remount("/", False)
58
         storage.remount("/", False)
53
-        print("Switch True (not grounded), PyDOS FS is ReadWrite")
59
+        print("Switch True (not grounded), FS is ReadWrite")
54
 
60
 
55
     switch.deinit()
61
     switch.deinit()
56
 else:
62
 else:
57
-    print("If write access from the host is needed, enter the following PyDOS command:\nfs ro")
58
     storage.remount("/", False )
63
     storage.remount("/", False )