#include <INA3221_Class.hpp>
|
| INA3221_Class (std::uint8_t i2c_addr=DEFAULT_ADDRESS, std::uint32_t freq=400000, I2C_Class *i2c=&In_I2C) |
|
bool | begin (void) |
|
float | getBusVoltage (uint8_t channel) |
|
float | getShuntVoltage (uint8_t channel) |
|
float | getCurrent (uint8_t channel) |
|
int_fast16_t | getBusMilliVoltage (uint8_t channel) |
|
int32_t | getShuntMilliVoltage (uint8_t channel) |
|
void | setShuntRes (uint8_t channel, uint32_t res) |
|
| I2C_Device (std::uint8_t i2c_addr, std::uint32_t freq, I2C_Class *i2c=&In_I2C) |
|
void | setPort (I2C_Class *i2c) |
|
bool | writeRegister8 (std::uint8_t reg, std::uint8_t data) const |
|
std::uint8_t | readRegister8 (std::uint8_t reg) const |
|
bool | writeRegister8Array (const std::uint8_t *reg_data_array, std::size_t length) const |
|
bool | writeRegister (std::uint8_t reg, const std::uint8_t *data, std::size_t length) const |
|
bool | readRegister (std::uint8_t reg, std::uint8_t *result, std::size_t length) const |
|
bool | bitOn (std::uint8_t reg, std::uint8_t bit) const |
|
bool | bitOff (std::uint8_t reg, std::uint8_t bit) const |
|
bool | isEnabled (void) const |
|
Definition at line 11 of file INA3221_Class.hpp.
◆ INA3221_Class()
◆ begin()
bool m5::INA3221_Class::begin |
( |
void |
| ) |
|
◆ getBusMilliVoltage()
int_fast16_t m5::INA3221_Class::getBusMilliVoltage |
( |
uint8_t |
channel | ) |
|
◆ getBusVoltage()
float m5::INA3221_Class::getBusVoltage |
( |
uint8_t |
channel | ) |
|
Get the voltage of the specified channel.
- Parameters
-
channel | 0=1ch / 1=2ch / 2=3ch / other=invalid |
- Returns
- voltage [mV]
Definition at line 50 of file INA3221_Class.cpp.
◆ getCurrent()
float m5::INA3221_Class::getCurrent |
( |
uint8_t |
channel | ) |
|
◆ getShuntMilliVoltage()
int32_t m5::INA3221_Class::getShuntMilliVoltage |
( |
uint8_t |
channel | ) |
|
◆ getShuntVoltage()
float m5::INA3221_Class::getShuntVoltage |
( |
uint8_t |
channel | ) |
|
◆ setShuntRes()
void m5::INA3221_Class::setShuntRes |
( |
uint8_t |
channel, |
|
|
uint32_t |
res |
|
) |
| |
◆ DEFAULT_ADDRESS
constexpr std::uint8_t m5::INA3221_Class::DEFAULT_ADDRESS = 0x40 |
|
staticconstexpr |
◆ INA3221_CH1_BUS_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH1_BUS_V = 0x02 |
|
staticconstexpr |
◆ INA3221_CH1_SHUNT_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH1_SHUNT_V = 0x01 |
|
staticconstexpr |
◆ INA3221_CH2_BUS_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH2_BUS_V = 0x04 |
|
staticconstexpr |
◆ INA3221_CH2_SHUNT_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH2_SHUNT_V = 0x03 |
|
staticconstexpr |
◆ INA3221_CH3_BUS_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH3_BUS_V = 0x06 |
|
staticconstexpr |
◆ INA3221_CH3_SHUNT_V
constexpr uint8_t m5::INA3221_Class::INA3221_CH3_SHUNT_V = 0x05 |
|
staticconstexpr |
◆ INA3221_CH_NUM_MAX
constexpr std::uint8_t m5::INA3221_Class::INA3221_CH_NUM_MAX = 3 |
|
staticconstexpr |
The documentation for this class was generated from the following files: