Add WM8731.read() for cached values.

This commit is contained in:
Jared Boone 2015-12-14 12:09:01 -08:00
parent ee3a77f32c
commit 24d60a11e3
2 changed files with 6 additions and 0 deletions

View File

@ -36,5 +36,9 @@ void WM8731::write(const address_t reg_address, const reg_t value) {
bus.transmit(bus_address, values.data(), values.size()); bus.transmit(bus_address, values.data(), values.size());
} }
reg_t WM8731::read(const address_t reg_address) {
return map.w[reg_address];
}
} /* namespace wm8731 */ } /* namespace wm8731 */
} /* namespace wolfson */ } /* namespace wolfson */

View File

@ -394,6 +394,8 @@ public:
// write(Register::AnalogAudioPathControl); // write(Register::AnalogAudioPathControl);
// } // }
reg_t read(const address_t reg_address);
private: private:
I2C& bus; I2C& bus;
const I2C::address_t bus_address; const I2C::address_t bus_address;