template <typename AddressType, typename DataType>
class FakeI2c
Defined at line 35 of file ../../src/media/audio/drivers/codecs/alc5663/tests/fake_i2c.h
A fake I2C device.
This class helps users implement fake I2C hardware. In particular,
hardware which uses the style of having reads and writes of
fixed-size data words at fixed-size addresses can use this class to
listen and respond to the reads and writes of an I2C driver.
The constructor takes two callbacks: "on_read" and "on_write" which
will be invoked each time the driver performs a read or write
respectively.
Public Methods
void FakeI2c<AddressType, DataType> (fit::function<DataType (AddressType)> on_read, fit::function<void (AddressType, DataType)> on_write)
Construct a FakeI2c, which will call the given function "on_read" each time
a read takes place to this device, and similarly call "on_write" for writes.
Defined at line 39 of file ../../src/media/audio/drivers/codecs/alc5663/tests/fake_i2c.h
void GetName (GetNameCompleter::Sync & completer)
Defined at line 46 of file ../../src/media/audio/drivers/codecs/alc5663/tests/fake_i2c.h
void Transfer (TransferRequestView request, TransferCompleter::Sync & completer)
Implementation of |fuchsia.hardware.i2c.Device|.
Defined at line 70 of file ../../src/media/audio/drivers/codecs/alc5663/tests/fake_i2c.h