inamodule

package
v0.0.0-...-ef9af93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

code and configuration loosely based on the implementation in esphome https://github.com/esphome/esphome/blob/dev/esphome/components/ina3221/ina3221.cpp

Index

Constants

This section is empty.

Variables

View Source
var Model = resource.ModelNamespace("bee-ring").WithFamily("sensor").WithModel("ina")
View Source
var PowerModel = resource.ModelNamespace("bee-ring").WithFamily("power_sensor").WithModel("ina")

Functions

This section is empty.

Types

type Config

type Config struct {
	Model      string  `json:"model"`
	I2CBus     string  `json:"i2c_bus"`
	I2cAddr    int     `json:"i2c_addr,omitempty"`
	Channel    string  `json:"channel,omitempty"`
	VoltageMul float64 `json:"voltageMul,omitempty"`
}

Config is used for converting config attributes.

func (*Config) Validate

func (config *Config) Validate(path string) ([]string, error)

Validate ensures all parts of the config are valid.

type RegName

type RegName int
const (
	Configuration RegName = iota
	Channel1ShuntVoltage
	Channel1BusVoltage
	Channel2ShuntVoltage
	Channel2BusVoltage
	Channel3ShuntVoltage
	Channel3BusVoltage
	Channel1CriticalAlertLimit
	Channel1WarningAlertLimit
	Channel2CriticalAlertLimit
	Channel2WarningAlertLimit
	Channel3CriticalAlertLimit
	Channel3WarningAlertLimit
	ShuntVoltageSum
	ShuntVoltageSumLimit
	MaskEnable
	PowerValidUpperLimit
	PowerValidLowerLimit
	ManufacturerID
	DieID
	Channel1Power
	Channel1Current
	Calibration
)

type Register

type Register struct {
	Address  byte
	Writable bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL