writeI2C now returns bool

master
Steve Lascos 7 years ago
parent 3224e98182
commit f3104753fc
  1. 4
      src/BAAudioControlWM8731.cpp
  2. 2
      src/BAAudioControlWM8731.h

@ -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

@ -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.

Loading…
Cancel
Save