File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1024,6 +1024,7 @@ def lazily_generate_conditions():
1024
1024
yield self .board .QTPY_U2IF
1025
1025
yield self .board .QT2040_TRINKEY_U2IF
1026
1026
yield self .board .KB2040_U2IF
1027
+ yield self .board .OS_AGNOSTIC_BOARD
1027
1028
1028
1029
return any (condition for condition in lazily_generate_conditions ())
1029
1030
@@ -1093,6 +1094,11 @@ def microchip_mcp2221(self) -> bool:
1093
1094
"""Check whether the current board is a Microchip MCP2221."""
1094
1095
return self .id == boards .MICROCHIP_MCP2221
1095
1096
1097
+ @property
1098
+ def os_agnostic_board (self ) -> bool :
1099
+ """Check whether the current board is an OS agnostic special case."""
1100
+ return self .id == boards .OS_AGNOSTIC_BOARD
1101
+
1096
1102
@property
1097
1103
def pico_u2if (self ) -> bool :
1098
1104
"""Check whether the current board is a RPi Pico w/ u2if."""
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ def id(
98
98
"BLINKA_MCP2221 environment variable "
99
99
+ "set, but no MCP2221 device found"
100
100
)
101
+ if os .environ .get ("BLINKA_OS_AGNOSTIC" ):
102
+ # we don't need to look for this chip, it's just a flag
103
+ self ._chip_id = chips .OS_AGNOSTIC
104
+ return self ._chip_id
101
105
if os .environ .get ("BLINKA_U2IF" ):
102
106
import hid
103
107
Original file line number Diff line number Diff line change 588
588
589
589
# Luckfox
590
590
_LUCKFOX_IDS = (LUCKFOX_PICO_MAX ,)
591
+
592
+ # Agnostic board
593
+ OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"
Original file line number Diff line number Diff line change 4
4
5
5
"""Definition of chips."""
6
6
A311D = "A311D"
7
+ OS_AGNOSTIC = "OS_AGNOSTIC"
7
8
AM33XX = "AM33XX"
8
9
AM625X = "AM625X"
9
10
AM65XX = "AM65XX"
You can’t perform that action at this time.
0 commit comments