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)
| 128 | |
| 129 | |
| 130 | def 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 | |
| 149 | def get_boards_for_platform(platform: str) -> list[str]: |
no test coverage detected