|
M5Unified
|
#include <IP5306_Class.hpp>


Public Member Functions | |
| IP5306_Class (std::uint8_t i2c_addr=DEFAULT_ADDRESS, std::uint32_t freq=400000, I2C_Class *i2c=&In_I2C) | |
| bool | begin (void) |
| std::int8_t | getBatteryLevel (void) |
| void | setBatteryCharge (bool enable) |
| void | setChargeCurrent (std::uint16_t max_mA) |
| void | setChargeVoltage (std::uint16_t max_mV) |
| bool | isCharging (void) |
| Get whether the battery is currently charging or not. More... | |
| bool | setPowerBoostKeepOn (bool en) |
| Set whether or not to continue supplying power even at low loads. More... | |
Public Member Functions inherited from m5::I2C_Device | |
| 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 |
Static Public Attributes | |
| static constexpr std::uint8_t | DEFAULT_ADDRESS = 0x75 |
Additional Inherited Members | |
Protected Attributes inherited from m5::I2C_Device | |
| I2C_Class * | _i2c |
| std::uint32_t | _freq |
| std::uint8_t | _addr |
| bool | _init |
Definition at line 11 of file IP5306_Class.hpp.
|
inline |
Definition at line 17 of file IP5306_Class.hpp.
| bool m5::IP5306_Class::begin | ( | void | ) |
Definition at line 30 of file IP5306_Class.cpp.


| std::int8_t m5::IP5306_Class::getBatteryLevel | ( | void | ) |
Get the remaining battery power.
Definition at line 45 of file IP5306_Class.cpp.


| bool m5::IP5306_Class::isCharging | ( | void | ) |
Get whether the battery is currently charging or not.
Definition at line 106 of file IP5306_Class.cpp.


| void m5::IP5306_Class::setBatteryCharge | ( | bool | enable | ) |
set battery charge enable.
| enable | true=enable / false=disable |
Definition at line 60 of file IP5306_Class.cpp.


| void m5::IP5306_Class::setChargeCurrent | ( | std::uint16_t | max_mA | ) |
set battery charge current
| max_mA | milli ampere. (150 - 3150). |
Definition at line 71 of file IP5306_Class.cpp.


| void m5::IP5306_Class::setChargeVoltage | ( | std::uint16_t | max_mV | ) |
set battery charge voltage
| max_mV | milli volt. (4200 - 4400). |
4300mV
4350mV
4400mV
Definition at line 83 of file IP5306_Class.cpp.


| bool m5::IP5306_Class::setPowerBoostKeepOn | ( | bool | en | ) |
Set whether or not to continue supplying power even at low loads.
Definition at line 112 of file IP5306_Class.cpp.


|
staticconstexpr |
Definition at line 15 of file IP5306_Class.hpp.