M5Unit-METER 0.2.1 git rev:6a6ea23
Loading...
Searching...
No Matches
unit_INA226.hpp File Reference

INA226 Unit for M5UnitUnified. More...

#include <M5UnitComponent.hpp>
#include <limits>

Go to the source code of this file.

Classes

struct  m5::unit::ina226::Data
 Measurement data group. More...
 
class  m5::unit::UnitINA226
 Base class for INA226 unit. More...
 
struct  m5::unit::UnitINA226::config_t
 Settings for begin. More...
 
class  m5::unit::UnitINA226_10A
 UnitINA226_10A unit. More...
 
class  m5::unit::UnitINA226_1A
 UnitINA226_1A unit. More...
 

Namespaces

namespace  m5
 Top level namespace of M5stack.
 

Enumerations

enum class  m5::unit::ina226::Sampling : uint8_t {
  Rate1 , Rate4 , Rate16 , Rate64 ,
  Rate128 , Rate256 , Rate512 , Rate1024
}
 The number of samples that are collected and averaged. More...
 
enum class  m5::unit::ina226::ConversionTime : uint8_t {
  US_140 , US_204 , US_332 , US_588 ,
  US_1100 , US_2116 , US_4156 , US_8244
}
 The conversion time for the bus voltage measurement. More...
 
enum class  m5::unit::ina226::Mode : uint8_t {
  PowerDown , ShuntVoltageSingle , BusVoltageSingle , ShuntAndBusSingle ,
  ShuntVoltage = 0x05 , BusVoltage , ShuntAndBus
}
 Operation mode. More...
 
enum class  m5::unit::ina226::Alert : int8_t {
  Unknown = -1 , None , ShuntOver , ShuntUnder ,
  BusOver , BusUnder , PowerOver , ConversionReady
}
 Alert type. More...
 

Detailed Description

INA226 Unit for M5UnitUnified.

Enumeration Type Documentation

◆ Alert

enum class m5::unit::ina226::Alert : int8_t
strong

Alert type.

Enumerator
None 

No alert.

ShuntOver 

Shunt Voltage Over-Voltage.

ShuntUnder 

Shunt Voltage Under-Voltage.

BusOver 

Bus Voltage Over-Voltage.

BusUnder 

Bus Voltage Under-Voltage.

PowerOver 

Power Over-limit.

ConversionReady 

Conversion Ready.

◆ ConversionTime

enum class m5::unit::ina226::ConversionTime : uint8_t
strong

The conversion time for the bus voltage measurement.

Enumerator
US_140 

140 us

US_204 

204 us

US_332 

332 us

US_588 

588 us

US_1100 

1.1 ms (as default)

US_2116 

2.116 ms

US_4156 

4.156 ms

US_8244 

8.244 ms

◆ Mode

enum class m5::unit::ina226::Mode : uint8_t
strong

Operation mode.

Enumerator
PowerDown 

Power-Down (or Shutdown)

ShuntVoltageSingle 

Shunt Voltage, Triggered.

BusVoltageSingle 

Bus Voltage, Triggered.

ShuntAndBusSingle 

Shunt and Bus, Triggered.

ShuntVoltage 

Shunt Voltage, Continuous.

BusVoltage 

Bus Voltage, Continuous.

ShuntAndBus 

Shunt and Bus, Continuous (as default)

◆ Sampling

enum class m5::unit::ina226::Sampling : uint8_t
strong

The number of samples that are collected and averaged.

Enumerator
Rate1 

1 sps (as default)

Rate4 

4 sps

Rate16 

16 sps

Rate64 

64 sps

Rate128 

128 sps

Rate256 

256 sps

Rate512 

512 sps

Rate1024 

1024 sps