Skip to content

Commit da4f51b

Browse files
committed
fix init functions
1 parent bb74e6e commit da4f51b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/ESP_I2S/src/ESP_I2S.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void I2SClass::setInvertedPdm(bool clk){
257257
_rx_clk_inv = clk;
258258
}
259259

260-
bool initSTD(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
260+
bool I2SClass::initSTD(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
261261
// Peripheral manager deinit previous peripheral if pin was used
262262
if (!perimanSetPinBus(_mclk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
263263
if (!perimanSetPinBus(_bclk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
@@ -305,7 +305,7 @@ bool initSTD(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
305305
return false;
306306
}
307307

308-
bool initTDM(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, i2s_tdm_slot_mask_t slot_mask){
308+
bool I2SClass::initTDM(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, i2s_tdm_slot_mask_t slot_mask){
309309
// Peripheral manager deinit previous peripheral if pin was used
310310
if (!perimanSetPinBus(_mclk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
311311
if (!perimanSetPinBus(_bclk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
@@ -353,7 +353,7 @@ bool initTDM(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, i
353353
return false;
354354
}
355355

356-
bool initPDMtx(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
356+
bool I2SClass::initPDMtx(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
357357
// Peripheral manager deinit previous peripheral if pin was used
358358
if (!perimanSetPinBus(_tx_clk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
359359
if (_tx_dout0 >= 0) if (!perimanSetPinBus(_tx_dout0, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
@@ -384,7 +384,7 @@ bool initPDMtx(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch)
384384
return false;
385385
}
386386

387-
bool initPDMrx(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
387+
bool I2SClass::initPDMrx(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch){
388388
// Peripheral manager deinit previous peripheral if pin was used
389389
if (!perimanSetPinBus(_rx_clk, ESP32_BUS_TYPE_INIT, NULL)){ return false; }
390390
if (_rx_din0 >= 0) if (!perimanSetPinBus(_rx_din0, ESP32_BUS_TYPE_INIT, NULL)){ return false; }

0 commit comments

Comments
 (0)