Skip to content

Commit 349e67f

Browse files
Fix I2S reported rate for 24b mode (esp8266#7838)
Adjust the number of bittimes when returning the real I2S rate.
1 parent f0e8f8e commit 349e67f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/esp8266/core_esp8266_i2s.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void i2s_set_dividers(uint8_t div1, uint8_t div2) {
502502
}
503503

504504
float i2s_get_real_rate(){
505-
return (float)I2SBASEFREQ/32/((I2SC>>I2SBD) & I2SBDM)/((I2SC >> I2SCD) & I2SCDM);
505+
return (float)I2SBASEFREQ/(_i2s_bits * 2)/((I2SC>>I2SBD) & I2SBDM)/((I2SC >> I2SCD) & I2SCDM);
506506
}
507507

508508
bool i2s_rxtx_begin(bool enableRx, bool enableTx) {

0 commit comments

Comments
 (0)