template <typename AddressIntType>
class I2cClient
Defined at line 47 of file ../../src/media/audio/drivers/codecs/alc5663/i2c_client.h
Read and write to a device behind a I2cChannel.
We assume the underlying hardware device uses a protocol where:
* "Read" is implemented by writing the target address register,
followed by reading a fixed width data word;
* "Write" is implemented by writing the target address register
immediately followed by a fixed width data word.
These assumptions allow us to provide a simpler interface than the
raw I2cChannel interface (which supports arbitrary length data
transfers).
Public Methods
void I2cClient<AddressIntType> (ddk::I2cChannel channel)
Create an I2cClient backed by the given channel.
Defined at line 52 of file ../../src/media/audio/drivers/codecs/alc5663/i2c_client.h
template <typename ValueType>
zx_status_t Read (AddressIntType addr, ValueType * result)
Implementation details follow.
Defined at line 116 of file ../../src/media/audio/drivers/codecs/alc5663/i2c_client.h
template <typename ValueType>
zx_status_t Write (AddressIntType addr, ValueType val)
Defined at line 131 of file ../../src/media/audio/drivers/codecs/alc5663/i2c_client.h