Skip to content

Commit a1e512f

Browse files
committed
Add documentation
1 parent 4db9acd commit a1e512f

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/Battery.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ enum class NTCResistor {
1515
Resistor100K
1616
};
1717

18+
/**
19+
* @brief This struct contains the characteristics of the battery.
20+
*/
1821
struct BatteryCharacteristics {
1922
/// @brief The battery's capacity in milliampere-hours (mAh).
2023
int capacity = 0;
@@ -33,6 +36,7 @@ struct BatteryCharacteristics {
3336
/// @brief The NTC resistor value used in the battery pack (10K or 100K Ohm).
3437
NTCResistor ntcResistor = NTCResistor::Resistor10K;
3538

39+
/// @brief Sets the voltage level for clearing empty detection. Once the cell voltage rises above this point, empty voltage detection is re-enabled.
3640
float recoveryVoltage = DEFAULT_RECOVERY_VOLTAGE;
3741
};
3842

@@ -46,6 +50,10 @@ class Battery {
4650
*/
4751
Battery();
4852

53+
/**
54+
* @brief Initializes the battery object with the given battery characteristics.
55+
* @param batteryCharacteristics The characteristics of the battery.
56+
*/
4957
Battery(BatteryCharacteristics batteryCharacteristics);
5058

5159
/**

src/Board.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,26 @@ class Board {
141141
* @return True if successful, false otherwise.
142142
*/
143143
bool enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, void (* const callbackFunction)(), RTClock * rtc = &RTC);
144+
145+
/**
146+
* @brief Enables wake-up of the device from the RTC.
147+
* @param hours The number of hours to sleep.
148+
* @param minutes The number of minutes to sleep.
149+
* @param seconds The number of seconds to sleep.
150+
* @param rtc The RTC instance to use for the sleep function. Default is the shared RTC instance.
151+
* @return True if successful, false otherwise.
152+
*/
144153
bool enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, RTClock * rtc = &RTC);
145154
#endif
146155

147156
#if defined(ARDUINO_PORTENTA_H7)
157+
/**
158+
* Enables wake-up of the device from the RTC.
159+
* @param hours The number of hours to sleep.
160+
* @param minutes The number of minutes to sleep.
161+
* @param seconds The number of seconds to sleep.
162+
* @return True if successful, false otherwise.
163+
*/
148164
bool enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds);
149165
#endif
150166

src/MAX1726Driver.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ enum class FuelGaugeOperationMode {
99

1010
constexpr uint8_t DEFAULT_I2C_ADDRESS = 0x36;
1111

12+
/**
13+
* @brief Driver class for the MAX1726 Fuel Gauge IC.
14+
*/
1215
class MAX1726Driver {
1316
private:
1417
TwoWire *wire;

0 commit comments

Comments
 (0)