fix(docs): Correct i2s.srt api example (#9968)

This commit is contained in:
Dawid Strzybny 2024-07-01 11:00:11 +02:00 committed by GitHub
parent bc5efee6cb
commit 88ad677f00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -546,9 +546,9 @@ Sample code
I2S.read();
available_bytes = I2S.available();
if(available_bytes < buff_size) {
read_bytes = I2S.read(buffer, available_bytes);
read_bytes = I2S.readBytes(buffer, available_bytes);
} else {
read_bytes = I2S.read(buffer, buff_size);
read_bytes = I2S.readBytes(buffer, buff_size);
}
I2S.write(buffer, read_bytes);
I2S.end();