arduino-audio-tools
|
Base class for all Streams. It relies on write(const uint8_t *buffer, size_t size) and readBytes(uint8_t *buffer, size_t length). More...
#include <BaseStream.h>
Public Member Functions | |
BaseStream (BaseStream const &)=delete | |
virtual int | available () override |
virtual int | availableForWrite () override |
virtual bool | begin () |
virtual void | end () |
virtual void | flush () override |
operator bool () | |
BaseStream & | operator= (BaseStream const &)=delete |
virtual size_t | readBytes (uint8_t *data, size_t len)=0 |
virtual size_t | write (const uint8_t *data, size_t len) override=0 |
virtual size_t | write (uint8_t ch) override |
Protected Member Functions | |
void | refillReadBuffer () |
Protected Attributes | |
int | _timeout = 10 |
RingBuffer< uint8_t > | tmp_in {0} |
RingBuffer< uint8_t > | tmp_out {0} |
Base class for all Streams. It relies on write(const uint8_t *buffer, size_t size) and readBytes(uint8_t *buffer, size_t length).