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

Function get_default_boards

ci/compiler/board_example_utils.py:28–68  ·  view source on GitHub ↗

Get all board names from the ALL boards list, with preferred boards first. Returns: List of board names in preferred order

()

Source from the content-addressed store, hash-verified

26
27
28def get_default_boards() -> list[str]:
29 """Get all board names from the ALL boards list, with preferred boards first.
30
31 Returns:
32 List of board names in preferred order
33 """
34 # These are the boards we want to compile first (preferred order)
35 # Order matters: UNO first because it's used for global init and builds faster
36 preferred_board_names = [
37 "uno", # Build is faster if this is first, because it's used for global init.
38 "esp32dev",
39 "esp8266", # ESP8266
40 "esp32c3",
41 "esp32c6",
42 "esp32s3",
43 "teensylc",
44 "teensy31",
45 "teensy41",
46 "sam3x8e_due",
47 "rp2040",
48 "rp2350",
49 ]
50
51 # Get all available board names from the ALL list
52 available_board_names = {board.board_name for board in ALL}
53
54 # Start with preferred boards that exist, warn about missing ones
55 default_boards: list[str] = []
56 for board_name in preferred_board_names:
57 if board_name in available_board_names:
58 default_boards.append(board_name)
59 else:
60 print(
61 f"WARNING: Preferred board '{board_name}' not found in available boards"
62 )
63
64 # Add all remaining boards (sorted for consistency)
65 remaining_boards = sorted(available_board_names - set(default_boards))
66 default_boards.extend(remaining_boards)
67
68 return default_boards
69
70
71def get_all_examples() -> list[str]:

Callers 1

mainFunction · 0.90

Calls 3

printFunction · 0.50
setClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected