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

Function print_phase3_cpp_definition

ci/tools/led_timing_conversions.py:330–346  ·  view source on GitHub ↗

Print 3-phase C++ struct definition. Args: fl: 3-phase timing to output name: Name for the timing struct

(fl: Timing3Phase, name: str = "CUSTOM")

Source from the content-addressed store, hash-verified

328
329
330def print_phase3_cpp_definition(fl: Timing3Phase, name: str = "CUSTOM") -> None:
331 """Print 3-phase C++ struct definition.
332
333 Args:
334 fl: 3-phase timing to output
335 name: Name for the timing struct
336 """
337 print("\n3-Phase C++ Definition:")
338 print("-" * 50)
339 print(f"struct TIMING_{name.upper()} {{")
340 print(" enum : uint32_t {")
341 print(f" T1 = {fl.T1},")
342 print(f" T2 = {fl.T2},")
343 print(f" T3 = {fl.T3},")
344 print(" RESET = 0")
345 print(" };")
346 print("};")
347
348
349def handle_interactive() -> None:

Callers 2

handle_interactiveFunction · 0.85
handle_datasheetFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected