5 #include <driver/i2s.h> 12 class I2SAudioComponent;
38 void setup()
override;
42 .mck_io_num = this->mclk_pin_,
43 .bck_io_num = this->bclk_pin_,
44 .ws_io_num = this->lrclk_pin_,
45 .data_out_num = I2S_PIN_NO_CHANGE,
46 .data_in_num = I2S_PIN_NO_CHANGE,
54 void lock() { this->lock_.lock(); }
55 bool try_lock() {
return this->lock_.try_lock(); }
56 void unlock() { this->lock_.unlock(); }
58 i2s_port_t
get_port()
const {
return this->port_; }
66 int mclk_pin_{I2S_PIN_NO_CHANGE};
67 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)
i2s_channel_fmt_t channel_
BedjetMode mode
BedJet operating mode.
void set_bits_per_sample(i2s_bits_per_sample_t bits_per_sample)
void set_channel(i2s_channel_fmt_t channel)
i2s_bits_per_sample_t bits_per_sample_
void set_bits_per_channel(i2s_bits_per_chan_t bits_per_channel)
Implementation of SPI Controller mode.
i2s_bits_per_chan_t bits_per_channel_
void set_sample_rate(uint32_t sample_rate)
void set_i2s_mode(i2s_mode_t mode)
void set_mclk_pin(int pin)
Helper class to easily give an object a parent of type T.
void set_use_apll(uint32_t use_apll)
Mutex implementation, with API based on the unavailable std::mutex.