mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-03 21:39:01 +00:00
Battery capacity options added (#3125)
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
#define PMEM_SIZE_BYTES 256 // total amount of pmem space in bytes, including checksum
|
||||
#define PMEM_SIZE_WORDS (PMEM_SIZE_BYTES / 4)
|
||||
|
||||
// to check battery mins and maxes in pmem, and validity
|
||||
#define BATT_18650_MIN_MAH 1000
|
||||
#define BATT_18650_MAX_MAH 5000
|
||||
|
||||
using namespace modems;
|
||||
using namespace serializer;
|
||||
using namespace ui;
|
||||
@@ -387,6 +391,11 @@ uint32_t pmem_data_word(uint32_t index);
|
||||
uint32_t pmem_stored_checksum(void);
|
||||
uint32_t pmem_calculated_checksum(void);
|
||||
|
||||
// battery capacity settings
|
||||
void set_battery_cap_mah(uint16_t mah); // 0 is not known; use assumed default based on device type/build config
|
||||
uint32_t battery_cap_mah();
|
||||
bool battery_cap_valid();
|
||||
|
||||
size_t data_size();
|
||||
|
||||
} /* namespace persistent_memory */
|
||||
|
||||
Reference in New Issue
Block a user