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

Function getPinWS

src/fl/audio/input.h:105–117  ·  view source on GitHub ↗

Get LRCLK (WS) pin for given I2S port

Source from the content-addressed store, hash-verified

103
104// Get LRCLK (WS) pin for given I2S port
105constexpr int getPinWS(I2SPort port) FL_NOEXCEPT {
106#if defined(FL_IS_TEENSY_3X) || defined(FL_IS_TEENSY_35) || \
107 defined(FL_IS_TEENSY_36)
108 // Teensy 3.x - only I2S1 available
109 return (port == I2SPort::I2S1) ? 23 : -1;
110#elif defined(FL_IS_TEENSY_4X)
111 // Teensy 4.x - I2S1 and I2S2 available
112 return (port == I2SPort::I2S1) ? 20 : 3;
113#else
114 // Unknown platform - evaluate parameter to avoid unused warning
115 return (port == I2SPort::I2S1 || port == I2SPort::I2S2) ? -1 : -1;
116#endif
117}
118
119// Get RX (SD) pin for given I2S port
120constexpr int getPinSD(I2SPort port) FL_NOEXCEPT {

Callers 1

CreateTeensyI2SMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected