ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
i2s_audio.cpp
Go to the documentation of this file.
1#include "i2s_audio.h"
2
3#ifdef USE_ESP32
4
5#include "esphome/core/log.h"
6
7namespace esphome {
8namespace i2s_audio {
9
10static const char *const TAG = "i2s_audio";
11
13 static i2s_port_t next_port_num = I2S_NUM_0;
14 if (next_port_num >= SOC_I2S_NUM) {
15 ESP_LOGE(TAG, "Too many components");
16 this->mark_failed();
17 return;
18 }
19
20 this->port_ = next_port_num;
21 next_port_num = (i2s_port_t) (next_port_num + 1);
22}
23
24} // namespace i2s_audio
25} // namespace esphome
26
27#endif // USE_ESP32
virtual void mark_failed()
Mark this component as failed.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7