template <class RegType>
class Fusb302Register
Defined at line 69 of file ../../src/devices/power/drivers/fusb302/registers.h
Public Methods
RegType ReadFrom (fidl::ClientEnd<fuchsia_hardware_i2c::Device> & i2c)
Defined at line 71 of file ../../src/devices/power/drivers/fusb302/registers.h
template <typename F>
zx::result<> ReadModifyWrite (fidl::ClientEnd<fuchsia_hardware_i2c::Device> & i2c, F modify_function)
Only writes to the register if the mutation changes the value.
Usage:
zx::result
<
> result = Control0Reg::ReadModifyWrite(
i2c_, [
&
](Control0Reg
&
control0) {
control0.set_tx_flush(true);
});
if (result.is_ok()) {
...
}
Defined at line 88 of file ../../src/devices/power/drivers/fusb302/registers.h