class MeasureReg

Defined at line 259 of file ../../src/devices/power/drivers/fusb302/registers.h

MEASURE - Configures the measuring block.

This register has reserved/undocumented bits. It can only be safely updated

via read/modify/write operations.

After reset, the measure block will be set up to measure CC pins, and its

MDAC will generate 2.142 V.

Rev 5 datasheet: Table 20 on page 21

Public Members

 field_meas_vbus_269
 field_mdac_272

Public Methods

template <, >
typename SelfType::ValueType meas_vbus ()

If true, the VBUS is connected to the measure block's input.

If this bit is true, `Switches0Reg::MeasureConfigChannelPinSwitch()` must be kNone. The

datasheet schematics suggest that breaking this precondition will short the

VBUS and one of the CC pins.

If this bit is true, the MDAC's base is multiplied by 10 (420mV, instead of

42mV).

Defined at line 269 of file ../../src/devices/power/drivers/fusb302/registers.h

template <, >
SelfType & set_meas_vbus (typename SelfType::ValueType val)

If true, the VBUS is connected to the measure block's input.

If this bit is true, `Switches0Reg::MeasureConfigChannelPinSwitch()` must be kNone. The

datasheet schematics suggest that breaking this precondition will short the

VBUS and one of the CC pins.

If this bit is true, the MDAC's base is multiplied by 10 (420mV, instead of

42mV).

Defined at line 269 of file ../../src/devices/power/drivers/fusb302/registers.h

template <, >
typename SelfType::ValueType mdac ()

Read/written by {Set}ComparatorVoltageMv().

Defined at line 272 of file ../../src/devices/power/drivers/fusb302/registers.h

template <, >
SelfType & set_mdac (typename SelfType::ValueType val)

Read/written by {Set}ComparatorVoltageMv().

Defined at line 272 of file ../../src/devices/power/drivers/fusb302/registers.h

hwreg::I2cRegisterAddr<MeasureReg> Get ()

Defined at line 284 of file ../../src/devices/power/drivers/fusb302/registers.h

int32_t ComparatorVoltageMv ()

The reference voltage for the comparator, in mV.

Defined at line 1332 of file ../../src/devices/power/drivers/fusb302/registers.h

MeasureReg & SetComparatorVoltageMv (int32_t voltage_mv)

Configures the MDAC that generates the comparator reference voltage.

The comparator's other input must be configured (via

`set_meas_vbus()`) for the intended comparison before

using this helper.

Defined at line 1338 of file ../../src/devices/power/drivers/fusb302/registers.h

Records