File tree Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ def id(self):
95
95
board_id = boards .ODROID_XU4
96
96
elif chip_id == chips .FT232H :
97
97
board_id = boards .FTDI_FT232H
98
+ elif chip_id == chips .FT2232H :
99
+ board_id = boards .FTDI_FT2232H
98
100
elif chip_id == chips .APQ8016 :
99
101
board_id = boards .DRAGONBOARD_410C
100
102
elif chip_id in (chips .T210 , chips .T186 , chips .T194 ):
@@ -437,6 +439,11 @@ def ftdi_ft232h(self):
437
439
"""Check whether the current board is an FTDI FT232H."""
438
440
return self .id == boards .FTDI_FT232H
439
441
442
+ @property
443
+ def ftdi_ft2232h (self ):
444
+ """Check whether the current board is an FTDI FT2232H."""
445
+ return self .id == boards .FTDI_FT2232H
446
+
440
447
@property
441
448
def microchip_mcp2221 (self ):
442
449
"""Check whether the current board is a Microchip MCP2221."""
Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ def id(
76
76
+ "set, but no FT232H device found"
77
77
)
78
78
return chips .FT232H
79
+ if os .environ .get ("BLINKA_FT2232H" ):
80
+ from pyftdi .usbtools import UsbTools
81
+
82
+ # look for it based on PID/VID
83
+ count = len (UsbTools .find_all ([(0x0403 , 0x6010 )]))
84
+ if count == 0 :
85
+ raise RuntimeError (
86
+ "BLINKA_FT2232H environment variable "
87
+ + "set, but no FT2232H device found"
88
+ )
89
+ return chips .FT2232H
79
90
if os .environ .get ("BLINKA_MCP2221" ):
80
91
import hid
81
92
Original file line number Diff line number Diff line change 77
77
ODROID_XU4 = "ODROID_XU4"
78
78
79
79
FTDI_FT232H = "FTDI_FT232H"
80
+ FTDI_FT2232H = "FTDI_FT2232H"
80
81
DRAGONBOARD_410C = "DRAGONBOARD_410C"
81
82
82
83
SIFIVE_UNLEASHED = "SIFIVE_UNLEASHED"
Original file line number Diff line number Diff line change 20
20
APQ8016 = "APQ8016"
21
21
GENERIC_X86 = "GENERIC_X86"
22
22
FT232H = "FT232H"
23
+ FT2232H = "FT2232H"
23
24
HFU540 = "HFU540"
24
25
MCP2221 = "MCP2221"
25
26
BINHO = "BINHO"
Original file line number Diff line number Diff line change 27
27
print (
28
28
"Is this an OS environment variable special case?" ,
29
29
detector .board .FTDI_FT232H
30
+ | detector .board .FTDI_FT2232H
30
31
| detector .board .MICROCHIP_MCP2221
31
32
| detector .board .BINHO_NOVA
32
33
| detector .board .GREATFET_ONE ,
You can’t perform that action at this time.
0 commit comments