Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def id(self) -> Optional[str]:
board_id = boards.FTDI_FT2232H
elif chip_id == chips.FT4232H:
board_id = boards.FTDI_FT4232H
elif chip_id == chips.SPIDRIVER:
board_id = boards.EXCAMERA_SPIDRIVER
elif chip_id == chips.APQ8016:
board_id = boards.DRAGONBOARD_410C
elif chip_id in (chips.T210, chips.T186, chips.T194, chips.T234, chips.T264):
Expand Down Expand Up @@ -1298,6 +1300,11 @@ def ftdi_ft2232h(self) -> bool:
"""Check whether the current board is an FTDI FT2232H."""
return self.id == boards.FTDI_FT2232H

@property
def excamera_spidriver(self) -> bool:
"""Check whether the current board is an Excamera SPIDriver."""
return self.id == boards.EXCAMERA_SPIDRIVER

@property
def ftdi_ft4232h(self) -> bool:
"""Check whether the current board is an FTDI FT4232H."""
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def id(
"BLINKA_MCP2221 environment variable "
+ "set, but no MCP2221 device found"
)
if os.environ.get("BLINKA_SPIDRIVER"):
self._chip_id = chips.SPIDRIVER
return self._chip_id
if os.environ.get("BLINKA_OS_AGNOSTIC"):
# we don't need to look for this chip, it's just a flag
self._chip_id = chips.OS_AGNOSTIC
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@
FTDI_FT4232H = "FTDI_FT4232H"
DRAGONBOARD_410C = "DRAGONBOARD_410C"

EXCAMERA_SPIDRIVER = "EXCAMERA_SPIDRIVER"
EXCAMERA_I2CDRIVER = "EXCAMERA_I2CDRIVER"

SIFIVE_UNLEASHED = "SIFIVE_UNLEASHED"

ALLWINER_D1 = "ALLWINER_D1"
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/constants/chips.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
FT232H = "FT232H"
FT2232H = "FT2232H"
FT4232H = "FT4232H"
SPIDRIVER = "SPIDRIVER"
I2CDRIVER = "I2CDRIVER"
HFU540 = "HFU540"
C906 = "C906"
JH71X0 = "JH71X0"
Expand Down
Loading