From f3104753fcfb49cba64261602a2383a5b7f3a965 Mon Sep 17 00:00:00 2001 From: Steve Lascos Date: Wed, 20 Dec 2017 19:37:43 -0500 Subject: [PATCH] writeI2C now returns bool --- src/BAAudioControlWM8731.cpp | 4 ++-- src/BAAudioControlWM8731.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BAAudioControlWM8731.cpp b/src/BAAudioControlWM8731.cpp index e506ee5..f5b2ae4 100644 --- a/src/BAAudioControlWM8731.cpp +++ b/src/BAAudioControlWM8731.cpp @@ -315,9 +315,9 @@ void BAAudioControlWM8731::resetCodec(void) } // Direct write control to the codec -void BAAudioControlWM8731::writeI2C(unsigned int addr, unsigned int val) +bool BAAudioControlWM8731::writeI2C(unsigned int addr, unsigned int val) { - write(addr, val); + return write(addr, val); } // Low level write control for the codec via the Teensy I2C interface diff --git a/src/BAAudioControlWM8731.h b/src/BAAudioControlWM8731.h index a43560d..af00261 100644 --- a/src/BAAudioControlWM8731.h +++ b/src/BAAudioControlWM8731.h @@ -110,7 +110,7 @@ public: /// @details See WM8731 datasheet for register map details. /// @param addr The register address you wish to write to, range 0 to 15. /// @param val the 9-bit data value you wish to write at the address specifed. - void writeI2C(unsigned int addr, unsigned int val); + bool writeI2C(unsigned int addr, unsigned int val); protected: // A shadow array for the registers on the codec since the interface is write-only.