]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #437 from tigard-tools/master
authorCarter Nelson <caternuson@gmail.com>
Wed, 12 May 2021 18:27:15 +0000 (11:27 -0700)
committerGitHub <noreply@github.com>
Wed, 12 May 2021 18:27:15 +0000 (11:27 -0700)
FT2232H support and FT232H/MPSSE refactor

1  2 
src/board.py

diff --combined src/board.py
index 20d1fd11ea89fd1b710fec87d677969e2ed00d67,4390b28b3b5e635a73b24b3cb235af1ca8b6e35f..0c8a6455ff962d4badde8034420e90698fa72b6e
@@@ -167,6 -167,9 +167,9 @@@ elif board_id == ap_board.DRAGONBOARD_4
  elif board_id == ap_board.FTDI_FT232H:
      from adafruit_blinka.board.ftdi_ft232h import *
  
+ elif board_id == ap_board.FTDI_FT2232H:
+     from adafruit_blinka.board.ftdi_ft2232h import *
  elif board_id == ap_board.BINHO_NOVA:
      from adafruit_blinka.board.binho_nova import *
  
@@@ -227,19 -230,6 +230,19 @@@ elif board_id == ap_board.PICO_U2IF
  elif "sphinx" in sys.modules:
      pass
  
 +elif board_id is None:
 +    import platform
 +    import pkg_resources
 +
 +    package = str(pkg_resources.get_distribution("adafruit_platformdetect")).split()
 +    raise NotImplementedError(
 +        "{1} version {2} was unable to identify the board and/or microcontroller running "
 +        "the {0} platform. Please be sure you have the latest packages running: 'pip3 install "
 +        "--upgrade adafruit-blinka adafruit-platformdetect'".format(
 +            platform.system(), package[0], package[1]
 +        )
 +    )
 +
  else:
      raise NotImplementedError("Board not supported {}".format(board_id))