5 #include <driver/i2s.h> 12 class I2SAudioComponent;
20 void setup()
override;
24 .mck_io_num = this->mclk_pin_,
25 .bck_io_num = this->bclk_pin_,
26 .ws_io_num = this->lrclk_pin_,
27 .data_out_num = I2S_PIN_NO_CHANGE,
28 .data_in_num = I2S_PIN_NO_CHANGE,
36 void lock() { this->lock_.lock(); }
37 bool try_lock() {
return this->lock_.try_lock(); }
38 void unlock() { this->lock_.unlock(); }
40 i2s_port_t
get_port()
const {
return this->port_; }
48 int mclk_pin_{I2S_PIN_NO_CHANGE};
49 int bclk_pin_{I2S_PIN_NO_CHANGE};
i2s_pin_config_t get_pin_config() const
i2s_port_t get_port() const
void set_lrclk_pin(int pin)
void set_bclk_pin(int pin)
Implementation of SPI Controller mode.
void set_mclk_pin(int pin)
Helper class to easily give an object a parent of type T.
Mutex implementation, with API based on the unavailable std::mutex.