Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5786e85

Browse files
committed
I2S - explicitly override Stream::read
> error: 'virtual int Stream::read(uint8_t*, size_t)' was hidden [-Werror=overloaded-virtual=]
1 parent 874ca44 commit 5786e85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎libraries/I2S/src/I2S.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ class I2SClass : public Stream
5555
// Read up to size samples from the I2S device. Non-blocking, will read
5656
// from 0...size samples and return the count read. Be sure your app handles
5757
// the partial read case (i.e. yield()ing and trying to read more).
58+
using Stream::read;
5859
int read(void* buffer, size_t size);
60+
int read(uint8_t* buffer, size_t size) override {
61+
return read(static_cast<void*>(buffer), size);
62+
}
5963

6064
// Write a single sample to the I2S device. Blocking until write succeeds
6165
size_t write(int32_t);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /