Table of Contents

Struct Ina226Config

Namespace
Pamoja.Sensors
Assembly
Pamoja.Sensors.dll

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

Averaging Ina226.Averaging

How many samples each result folds together.

BusConversionTime Ina226.ConversionTime

How long one bus-voltage conversion takes.

ShuntConversionTime Ina226.ConversionTime

How long one shunt-voltage conversion takes.

Mode Ina226.Mode

Which voltages are converted, and whether once or continuously.

Reset bool

Whether writing the register resets the part.

Properties

Averaging

How many samples each result folds together.

public Ina226.Averaging Averaging { get; init; }

Property Value

Ina226.Averaging

BusConversionTime

How long one bus-voltage conversion takes.

public Ina226.ConversionTime BusConversionTime { get; init; }

Property Value

Ina226.ConversionTime

Mode

Which voltages are converted, and whether once or continuously.

public Ina226.Mode Mode { get; init; }

Property Value

Ina226.Mode

PowerOn

The power-on configuration: no averaging, 1.1 ms conversions, shunt and bus continuous.

public static Ina226Config PowerOn { get; }

Property Value

Ina226Config

Reset

Whether writing the register resets the part.

public bool Reset { get; init; }

Property Value

bool

ShuntConversionTime

How long one shunt-voltage conversion takes.

public Ina226.ConversionTime ShuntConversionTime { get; init; }

Property Value

Ina226.ConversionTime

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

native PamojaIna226Config

The interop representation.

Returns

Ina226Config

The configuration.

ToNative()

Converts to the flat struct the C ABI takes.

public PamojaIna226Config ToNative()

Returns

PamojaIna226Config

The interop representation.