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

Method get_platform_defines

ci/util/build_info_analyzer.py:185–213  ·  view source on GitHub ↗

Get platform-specific preprocessor defines for a board. Args: board_name: Name of the board Returns: PlatformDefinesResult with ok, defines, and error fields

(self, board_name: str)

Source from the content-addressed store, hash-verified

183 return None
184
185 def get_platform_defines(self, board_name: str) -> PlatformDefinesResult:
186 """
187 Get platform-specific preprocessor defines for a board.
188
189 Args:
190 board_name: Name of the board
191
192 Returns:
193 PlatformDefinesResult with ok, defines, and error fields
194 """
195 data = self.load_build_info(board_name)
196 if not data:
197 return PlatformDefinesResult(
198 ok=False, defines=[], error=f"Build info not found for {board_name}"
199 )
200
201 board_key = self.create_board_key_from_build_info(data, board_name)
202 if not board_key:
203 available_keys = list(data.keys())
204 return PlatformDefinesResult(
205 ok=False,
206 defines=[],
207 error=f"Board key not found. Available keys: {available_keys}",
208 )
209
210 board_data = data[board_key]
211 defines = board_data.get("defines", [])
212
213 return PlatformDefinesResult(ok=True, defines=defines, error="")
214
215 def get_compiler_info(self, board_name: str) -> CompilerInfoResult:
216 """

Callers 3

build_info_analysisFunction · 0.95
compare_definesMethod · 0.95
mainFunction · 0.95

Calls 6

load_build_infoMethod · 0.95
listClass · 0.85
keysMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected