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 19
19
20
20
"""
21
21
22
-
23
22
import os
24
23
import sys
25
24
30
29
31
30
from adafruit_platformdetect .constants import chips
32
31
33
-
34
32
__version__ = "0.0.0+auto.0"
35
33
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
36
34
@@ -45,7 +43,7 @@ def __init__(self, detector) -> None:
45
43
# pylint: disable=invalid-name,too-many-branches,too-many-return-statements
46
44
@property
47
45
def id (
48
- self ,
46
+ self ,
49
47
) -> Optional [str ]:
50
48
"""Return a unique id for the detected chip, if any."""
51
49
# There are some times we want to trick the platform detection
@@ -112,31 +110,31 @@ def id(
112
110
# NOTE: If any products are added here, they need added
113
111
# to _rp2040_u2if_id() in board.py as well.
114
112
if (
115
- # Raspberry Pi Pico
116
- vendor == 0xCAFE
117
- and product == 0x4005
113
+ # Raspberry Pi Pico
114
+ vendor == 0xCAFE
115
+ and product == 0x4005
118
116
) 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
+ )
140
138
):
141
139
self ._chip_id = chips .RP2040_U2IF
142
140
return self ._chip_id
Original file line number Diff line number Diff line change 74
74
NANOPI_NEO = "NANOPI_NEO"
75
75
NANOPI_NEO_2 = "NANOPI_NEO_2"
76
76
77
-
78
77
# Banana Pi boards
79
78
BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO"
80
79
BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
You can’t perform that action at this time.
0 commit comments