File tree Expand file tree Collapse file tree 5 files changed +22
-0
lines changed Expand file tree Collapse file tree 5 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ def id(self):
105
105
board_id = boards .ODROID_XU4
106
106
elif chip_id == chips .FT232H :
107
107
board_id = boards .FTDI_FT232H
108
+ elif chip_id == chips .FT2232H :
109
+ board_id = boards .FTDI_FT2232H
108
110
elif chip_id == chips .APQ8016 :
109
111
board_id = boards .DRAGONBOARD_410C
110
112
elif chip_id in (chips .T210 , chips .T186 , chips .T194 ):
@@ -547,6 +549,11 @@ def ftdi_ft232h(self):
547
549
"""Check whether the current board is an FTDI FT232H."""
548
550
return self .id == boards .FTDI_FT232H
549
551
552
+ @property
553
+ def ftdi_ft2232h (self ):
554
+ """Check whether the current board is an FTDI FT2232H."""
555
+ return self .id == boards .FTDI_FT2232H
556
+
550
557
@property
551
558
def microchip_mcp2221 (self ):
552
559
"""Check whether the current board is a Microchip MCP2221."""
Original file line number Diff line number Diff line change @@ -83,6 +83,18 @@ def id(
83
83
)
84
84
self ._chip_id = chips .FT232H
85
85
return self ._chip_id
86
+ if os .environ .get ("BLINKA_FT2232H" ):
87
+ from pyftdi .usbtools import UsbTools
88
+
89
+ # look for it based on PID/VID
90
+ count = len (UsbTools .find_all ([(0x0403 , 0x6010 )]))
91
+ if count == 0 :
92
+ raise RuntimeError (
93
+ "BLINKA_FT2232H environment variable "
94
+ + "set, but no FT2232H device found"
95
+ )
96
+ self ._chip_id = chips .FT2232H
97
+ return self ._chip_id
86
98
if os .environ .get ("BLINKA_MCP2221" ):
87
99
import hid
88
100
Original file line number Diff line number Diff line change 104
104
ODROID_XU4 = "ODROID_XU4"
105
105
106
106
FTDI_FT232H = "FTDI_FT232H"
107
+ FTDI_FT2232H = "FTDI_FT2232H"
107
108
DRAGONBOARD_410C = "DRAGONBOARD_410C"
108
109
109
110
SIFIVE_UNLEASHED = "SIFIVE_UNLEASHED"
Original file line number Diff line number Diff line change 21
21
APQ8016 = "APQ8016"
22
22
GENERIC_X86 = "GENERIC_X86"
23
23
FT232H = "FT232H"
24
+ FT2232H = "FT2232H"
24
25
HFU540 = "HFU540"
25
26
MCP2221 = "MCP2221"
26
27
BINHO = "BINHO"
Original file line number Diff line number Diff line change 30
30
print (
31
31
"Is this an OS environment variable special case?" ,
32
32
detector .board .FTDI_FT232H
33
+ | detector .board .FTDI_FT2232H
33
34
| detector .board .MICROCHIP_MCP2221
34
35
| detector .board .BINHO_NOVA
35
36
| detector .board .GREATFET_ONE ,
You can’t perform that action at this time.
0 commit comments