Struct Ina226Config
An INA226 configuration register, field by field.
public readonly record struct Ina226Config : IEquatable<Ina226Config>
- Implements
- Inherited Members
Constructors
Ina226Config(Averaging, ConversionTime, ConversionTime, Mode, bool)
An INA226 configuration register, field by field.
public Ina226Config(Ina226.Averaging Averaging, Ina226.ConversionTime BusConversionTime, Ina226.ConversionTime ShuntConversionTime, Ina226.Mode Mode, bool Reset = false)
Parameters
AveragingIna226.AveragingHow many samples each result folds together.
BusConversionTimeIna226.ConversionTimeHow long one bus-voltage conversion takes.
ShuntConversionTimeIna226.ConversionTimeHow long one shunt-voltage conversion takes.
ModeIna226.ModeWhich voltages are converted, and whether once or continuously.
ResetboolWhether writing the register resets the part.
Properties
Averaging
How many samples each result folds together.
public Ina226.Averaging Averaging { get; init; }
Property Value
BusConversionTime
How long one bus-voltage conversion takes.
public Ina226.ConversionTime BusConversionTime { get; init; }
Property Value
Mode
Which voltages are converted, and whether once or continuously.
public Ina226.Mode Mode { get; init; }
Property Value
PowerOn
The power-on configuration: no averaging, 1.1 ms conversions, shunt and bus continuous.
public static Ina226Config PowerOn { get; }
Property Value
Reset
Whether writing the register resets the part.
public bool Reset { get; init; }
Property Value
ShuntConversionTime
How long one shunt-voltage conversion takes.
public Ina226.ConversionTime ShuntConversionTime { get; init; }
Property Value
Methods
From(PamojaIna226Config)
Names the fields of the flat struct the C ABI returns, such as ConfigFromRegister(ushort)'s.
public static Ina226Config From(PamojaIna226Config native)
Parameters
nativePamojaIna226ConfigThe interop representation.
Returns
- Ina226Config
The configuration.
ToNative()
Converts to the flat struct the C ABI takes.
public PamojaIna226Config ToNative()
Returns
- PamojaIna226Config
The interop representation.