MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_platform_for_board

Function get_platform_for_board

ci/docker_utils/build_platforms.py:130–146  ·  view source on GitHub ↗

Get the platform family name for a given board. Args: board_name: Board name (e.g., "uno", "esp32dev") Returns: Platform family name (e.g., "avr", "esp") or None if not found Example: >>> get_platform_for_board("uno") 'avr' >>> get_platform

(board_name: str)

Source from the content-addressed store, hash-verified

128
129
130def get_platform_for_board(board_name: str) -> Optional[str]:
131 """
132 Get the platform family name for a given board.
133
134 Args:
135 board_name: Board name (e.g., "uno", "esp32dev")
136
137 Returns:
138 Platform family name (e.g., "avr", "esp") or None if not found
139
140 Example:
141 >>> get_platform_for_board("uno")
142 'avr'
143 >>> get_platform_for_board("esp32s3")
144 'esp'
145 """
146 return BOARD_TO_PLATFORM.get(board_name)
147
148
149def get_boards_for_platform(platform: str) -> list[str]:

Callers 3

runMethod · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected