File tree Expand file tree Collapse file tree 2 files changed +25
-28
lines changed
Expand file tree Collapse file tree 2 files changed +25
-28
lines changed Original file line number Diff line number Diff line change 1919
2020"""
2121
22-
2322import os
2423import sys
2524
3029
3130from adafruit_platformdetect .constants import chips
3231
33-
3432__version__ = "0.0.0+auto.0"
3533__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
3634
@@ -45,7 +43,7 @@ def __init__(self, detector) -> None:
4543 # pylint: disable=invalid-name,too-many-branches,too-many-return-statements
4644 @property
4745 def id (
48- self ,
46+ self ,
4947 ) -> Optional [str ]:
5048 """Return a unique id for the detected chip, if any."""
5149 # There are some times we want to trick the platform detection
@@ -112,31 +110,31 @@ def id(
112110 # NOTE: If any products are added here, they need added
113111 # to _rp2040_u2if_id() in board.py as well.
114112 if (
115- # Raspberry Pi Pico
116- vendor == 0xCAFE
117- and product == 0x4005
113+ # Raspberry Pi Pico
114+ vendor == 0xCAFE
115+ and product == 0x4005
118116 ) or (
119- # Feather RP2040
120- # Itsy Bitsy RP2040
121- # QT Py RP2040
122- # QT2040 Trinkey
123- # MacroPad RP2040
124- # Feather RP2040 ThinkInk
125- # Feather RP2040 RFM
126- # Feather RP2040 CAN Bus
127- vendor == 0x239A
128- and product
129- in (
130- 0x00F1 ,
131- 0x00FD ,
132- 0x00F7 ,
133- 0x0109 ,
134- 0x0107 ,
135- 0x812C ,
136- 0x812E ,
137- 0x8130 ,
138- 0x0105 ,
139- )
117+ # Feather RP2040
118+ # Itsy Bitsy RP2040
119+ # QT Py RP2040
120+ # QT2040 Trinkey
121+ # MacroPad RP2040
122+ # Feather RP2040 ThinkInk
123+ # Feather RP2040 RFM
124+ # Feather RP2040 CAN Bus
125+ vendor == 0x239A
126+ and product
127+ in (
128+ 0x00F1 ,
129+ 0x00FD ,
130+ 0x00F7 ,
131+ 0x0109 ,
132+ 0x0107 ,
133+ 0x812C ,
134+ 0x812E ,
135+ 0x8130 ,
136+ 0x0105 ,
137+ )
140138 ):
141139 self ._chip_id = chips .RP2040_U2IF
142140 return self ._chip_id
Original file line number Diff line number Diff line change 7474NANOPI_NEO = "NANOPI_NEO"
7575NANOPI_NEO_2 = "NANOPI_NEO_2"
7676
77-
7877# Banana Pi boards
7978BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO"
8079BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
You can’t perform that action at this time.
0 commit comments