Factory method for Teensy I2S microphones (INMP441, ICS43432, SPH0645LM4H, etc.) Teensy uses fixed hardware pins - see TeensyI2S namespace for pin assignments. Example: auto config = AudioConfig::CreateTeensyI2S(TeensyI2S::I2S1, Right, 44100);
| 189 | // namespace for pin assignments. Example: auto config = |
| 190 | // AudioConfig::CreateTeensyI2S(TeensyI2S::I2S1, Right, 44100); |
| 191 | static Config CreateTeensyI2S( |
| 192 | TeensyI2S::I2SPort port = TeensyI2S::I2SPort::I2S1, |
| 193 | AudioChannel channel = AudioChannel::Right, |
| 194 | u16 sample_rate = AUDIO_DEFAULT_SAMPLE_RATE, |
| 195 | u8 bit_resolution = AUDIO_DEFAULT_BIT_RESOLUTION, |
| 196 | MicProfile profile = MicProfile::GenericMEMS) FL_NOEXCEPT { |
| 197 | ConfigI2S config( |
| 198 | TeensyI2S::getPinWS(port), // pin_ws (LRCLK) |
| 199 | TeensyI2S::getPinSD(port), // pin_sd (RX) |
| 200 | TeensyI2S::getPinCLK(port), // pin_clk (BCLK) |
| 201 | static_cast<int>(port), // i2s_num |
| 202 | channel, sample_rate, bit_resolution, |
| 203 | I2SCommFormat::Philips, // comm_format (Teensy uses I2S Philips) |
| 204 | false // invert |
| 205 | ); |
| 206 | Config out(config); |
| 207 | out.setMicProfile(profile); |
| 208 | return out; |
| 209 | } |
| 210 | |
| 211 | // SPM1423 PDM microphone (Knowles, common on ESP32-S3 Sense boards). |
| 212 | static Config CreateSpm1423Pdm(int pin_din, int pin_clk, |
nothing calls this directly
no test coverage detected