I2SStream operator bool() as is_active

This commit is contained in:
pschatzmann 2024-08-25 00:31:59 +02:00
parent df3ad65443
commit a89510a453

View File

@ -134,6 +134,10 @@ class I2SStream : public AudioStream {
/// Provides access to the driver
I2SDriver *driver() { return &i2s; }
operator bool() override { return is_active; }
bool isActive() { return is_active;}
protected:
I2SDriver i2s;
int mute_pin;