]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #579 from shulltronics/main 7.3.0
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Tue, 3 May 2022 18:21:34 +0000 (12:21 -0600)
committerGitHub <noreply@github.com>
Tue, 3 May 2022 18:21:34 +0000 (12:21 -0600)
Allow Blinka to run on non-embedded environments

src/microcontroller/__init__.py
src/microcontroller/pin.py

index d5996d9aac7862d52c1d13680d5d86c55bbc8533..39beeb9f05a641f9ccfc7215aad2994eca50db79 100644 (file)
@@ -118,6 +118,10 @@ elif chip_id == ap_chip.RP2040_U2IF:
     from adafruit_blinka.microcontroller.rp2040_u2if import *
 elif chip_id == ap_chip.GENERIC_X86:
     print("WARNING: GENERIC_X86 is not fully supported. Some features may not work.")
+elif chip_id is None:
+    print(
+        "WARNING: chip_id == None is not fully supported. Some features may not work."
+    )
 elif "sphinx" in sys.modules:
     pass
 else:
index 3f7b20e15097b018a6b798d60a0cb1ad6c97baab..97ef0a63f7d10a526ffce4089ffe7a056df114a3 100644 (file)
@@ -102,5 +102,13 @@ elif chip_id == ap_chip.RP2040_U2IF:
 elif "sphinx" in sys.modules:
     # pylint: disable=unused-import
     from adafruit_blinka.microcontroller.generic_micropython import Pin
+elif chip_id == ap_chip.GENERIC_X86:
+    print("WARNING: GENERIC_X86 is not fully supported. Some features may not work.")
+    from adafruit_blinka.microcontroller.generic_micropython import Pin
+elif chip_id is None:
+    print(
+        "WARNING: chip_id == None is not fully supported. Some features may not work."
+    )
+    from adafruit_blinka.microcontroller.generic_micropython import Pin
 else:
     raise NotImplementedError("Microcontroller not supported: ", chip_id)