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

Function handle_datasheet

ci/tools/led_timing_conversions.py:566–584  ·  view source on GitHub ↗

Handle datasheet to 3-phase conversion. Args: T0H: Time HIGH for '0' bit (nanoseconds) T0L: Time LOW for '0' bit (nanoseconds) T1H: Time HIGH for '1' bit (nanoseconds) T1L: Time LOW for '1' bit (nanoseconds) verbose: Whether to show verbose output

(T0H: int, T0L: int, T1H: int, T1L: int, verbose: bool)

Source from the content-addressed store, hash-verified

564
565
566def handle_datasheet(T0H: int, T0L: int, T1H: int, T1L: int, verbose: bool) -> None:
567 """Handle datasheet to 3-phase conversion.
568
569 Args:
570 T0H: Time HIGH for '0' bit (nanoseconds)
571 T0L: Time LOW for '0' bit (nanoseconds)
572 T1H: Time HIGH for '1' bit (nanoseconds)
573 T1L: Time LOW for '1' bit (nanoseconds)
574 verbose: Whether to show verbose output
575 """
576 ds = TimingDatasheet(T0H, T0L, T1H, T1L)
577 fl = datasheet_to_phase3(ds)
578
579 if verbose:
580 print(f"Datasheet Format: {ds}")
581 print(f"3-Phase Format: {fl}")
582 print_phase3_cpp_definition(fl)
583 else:
584 print(f"T1={fl.T1} T2={fl.T2} T3={fl.T3}")
585
586
587def handle_fastled(T1: int, T2: int, T3: int, verbose: bool) -> None:

Callers 1

mainFunction · 0.85

Calls 4

TimingDatasheetClass · 0.85
datasheet_to_phase3Function · 0.85
printFunction · 0.50

Tested by

no test coverage detected