Skip to content

Commit

Permalink
added chargingCurrent and chargingVoltage methods
Browse files Browse the repository at this point in the history
  • Loading branch information
duluthmachineworks committed Mar 5, 2024
1 parent 6f37667 commit ee85033
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/ArduinoSMBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,25 @@ uint16_t ArduinoSMBus::batteryStatus() {
return status;
}

/**
* @brief Get the battery's design charging current.
* Returns the desired design charging current of the battery, in mA.
* @return uint16_t
*/
uint16_t ArduinoSMBus::chargingCurrent() {
return readRegister(CHARGING_CURRENT);
}

/**
* @brief Get the battery's design charging voltage.
* Returns the desired design charging voltage of the battery, in mV.
* @return uint16_t
*/
uint16_t ArduinoSMBus::chargingVoltage() {
return readRegister(CHARGING_VOLTAGE);
}


/**
* @brief Check if the battery status is OK.
* Check for any alarm conditions in the battery status register. These include bits
Expand Down

0 comments on commit ee85033

Please sign in to comment.