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):
9595 board_id = boards .ODROID_XU4
9696 elif chip_id == chips .FT232H :
9797 board_id = boards .FTDI_FT232H
98+ elif chip_id == chips .FT2232H :
99+ board_id = boards .FTDI_FT2232H
98100 elif chip_id == chips .APQ8016 :
99101 board_id = boards .DRAGONBOARD_410C
100102 elif chip_id in (chips .T210 , chips .T186 , chips .T194 ):
@@ -437,6 +439,11 @@ def ftdi_ft232h(self):
437439 """Check whether the current board is an FTDI FT232H."""
438440 return self .id == boards .FTDI_FT232H
439441
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+
440447 @property
441448 def microchip_mcp2221 (self ):
442449 """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(
7676 + "set, but no FT232H device found"
7777 )
7878 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
7990 if os .environ .get ("BLINKA_MCP2221" ):
8091 import hid
8192
Original file line number Diff line number Diff line change 7777ODROID_XU4 = "ODROID_XU4"
7878
7979FTDI_FT232H = "FTDI_FT232H"
80+ FTDI_FT2232H = "FTDI_FT2232H"
8081DRAGONBOARD_410C = "DRAGONBOARD_410C"
8182
8283SIFIVE_UNLEASHED = "SIFIVE_UNLEASHED"
Original file line number Diff line number Diff line change 2020APQ8016 = "APQ8016"
2121GENERIC_X86 = "GENERIC_X86"
2222FT232H = "FT232H"
23+ FT2232H = "FT2232H"
2324HFU540 = "HFU540"
2425MCP2221 = "MCP2221"
2526BINHO = "BINHO"
Original file line number Diff line number Diff line change 2727print (
2828 "Is this an OS environment variable special case?" ,
2929 detector .board .FTDI_FT232H
30+ | detector .board .FTDI_FT2232H
3031 | detector .board .MICROCHIP_MCP2221
3132 | detector .board .BINHO_NOVA
3233 | detector .board .GREATFET_ONE ,
You can’t perform that action at this time.
0 commit comments