From 3a5405998ca7008ad9cf76f0a2053457976282c2 Mon Sep 17 00:00:00 2001 From: Ollo Date: Thu, 4 Feb 2021 21:06:08 +0100 Subject: [PATCH] Describe Page1 and Page7 --- esp32test/Esp32DeepSleepTest/include/DS2438.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/esp32test/Esp32DeepSleepTest/include/DS2438.h b/esp32test/Esp32DeepSleepTest/include/DS2438.h index 3054f1a..0dbc233 100644 --- a/esp32test/Esp32DeepSleepTest/include/DS2438.h +++ b/esp32test/Esp32DeepSleepTest/include/DS2438.h @@ -53,6 +53,28 @@ 0 /* Threashold */ \ } +typedef struct PageOne { + uint8_t eleapsedTimerByte0; /**< LSB of timestamp */ + uint8_t eleapsedTimerByte1; + uint8_t eleapsedTimerByte2; + uint8_t eleapsedTimerByte3; /**< MSB of timestamp */ + uint8_t ICA; /**< Integrated Current Accumulator (current flowing into and out of the battery) */ + uint8_t offsetRegisterByte0; /**< Offset for ADC calibdation */ + uint8_t offsetRegisterByte1; /**< Offset for ADC calibdation */ + uint8_t reserved; +} PageOne_t; + +typedef struct PageSeven { + uint8_t userByte0; + uint8_t userByte1; + uint8_t userByte2; + uint8_t userByte3; + uint8_t CCA0; /**< Charging Current Accumulator (CCA) */ + uint8_t CCA1; /**< Charging Current Accumulator (CCA) */ + uint8_t DCA0; /**< Discharge Current Accumulator (DCA) */ + uint8_t DCA1; /**< Discharge Current Accumulator (DCA) */ +} PageSeven_t; + typedef uint8_t DeviceAddress[8]; class DS2438 {