From 4db9acd1fb0de514f094a1dd88962d104011d2a2 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Tue, 4 Jun 2024 13:06:57 +0200 Subject: [PATCH] Add documentation --- src/MAX1726Driver.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/MAX1726Driver.h b/src/MAX1726Driver.h index c1724e3..012ef4d 100644 --- a/src/MAX1726Driver.h +++ b/src/MAX1726Driver.h @@ -13,10 +13,33 @@ class MAX1726Driver { private: TwoWire *wire; uint8_t i2cAddress; + /** + * Enables or disables the hibernate mode. + * + * @param enabled - true to enable hibernate mode, false to disable it. + */ void setHibernateModeEnabled(bool enabled); public: + /** + * Checks if the charging process is complete. + * + * @return true if the charging process is complete, false otherwise. + */ bool chargingComplete(); + /** + * Sets the operation mode of the Fuel Gauge. + * + * @param mode The operation mode to set. Possible values are: hibernate, shutdown, active. + * @return True if the operation mode was set successfully, false otherwise. + */ bool setOperationMode(FuelGaugeOperationMode mode); + + /** + * @brief Constructs a new MAX1726Driver object. + * + * @param wire Pointer to the TwoWire object for I2C communication. + * @param i2cAddress The I2C address of the MAX1726 device. The default value is 0x36. + */ MAX1726Driver(TwoWire *wire, uint8_t i2cAddress); ~MAX1726Driver(); };