fix(docs): Correct i2s.srt api example (#9968)
This commit is contained in:
parent
bc5efee6cb
commit
88ad677f00
1 changed files with 2 additions and 2 deletions
|
|
@ -546,9 +546,9 @@ Sample code
|
||||||
I2S.read();
|
I2S.read();
|
||||||
available_bytes = I2S.available();
|
available_bytes = I2S.available();
|
||||||
if(available_bytes < buff_size) {
|
if(available_bytes < buff_size) {
|
||||||
read_bytes = I2S.read(buffer, available_bytes);
|
read_bytes = I2S.readBytes(buffer, available_bytes);
|
||||||
} else {
|
} else {
|
||||||
read_bytes = I2S.read(buffer, buff_size);
|
read_bytes = I2S.readBytes(buffer, buff_size);
|
||||||
}
|
}
|
||||||
I2S.write(buffer, read_bytes);
|
I2S.write(buffer, read_bytes);
|
||||||
I2S.end();
|
I2S.end();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue