File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ def id(self) -> Optional[str]:
65
65
board_id = self ._armbian_id () or self ._allwinner_variants_id ()
66
66
elif chip_id == chips .BCM2XXX :
67
67
board_id = self ._pi_id ()
68
+ elif chip_id == chips .OS_AGNOSTIC :
69
+ board_id = boards .OS_AGNOSTIC_BOARD
68
70
elif chip_id == chips .AM625X :
69
71
board_id = self ._beaglebone_id ()
70
72
elif chip_id == chips .AM33XX :
@@ -1036,6 +1038,7 @@ def lazily_generate_conditions():
1036
1038
yield self .board .QTPY_U2IF
1037
1039
yield self .board .QT2040_TRINKEY_U2IF
1038
1040
yield self .board .KB2040_U2IF
1041
+ yield self .board .OS_AGNOSTIC_BOARD
1039
1042
1040
1043
return any (condition for condition in lazily_generate_conditions ())
1041
1044
@@ -1105,6 +1108,11 @@ def microchip_mcp2221(self) -> bool:
1105
1108
"""Check whether the current board is a Microchip MCP2221."""
1106
1109
return self .id == boards .MICROCHIP_MCP2221
1107
1110
1111
+ @property
1112
+ def os_agnostic_board (self ) -> bool :
1113
+ """Check whether the current board is an OS agnostic special case."""
1114
+ return self .id == boards .OS_AGNOSTIC_BOARD
1115
+
1108
1116
@property
1109
1117
def pico_u2if (self ) -> bool :
1110
1118
"""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 596
596
LUCKFOX_PICO_MAX ,
597
597
LUCKFOX_PICO_MINI ,
598
598
)
599
+
600
+ # Agnostic board
601
+ 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