From a1bae8180df688e07e2fe18ea37927d43cae6bda Mon Sep 17 00:00:00 2001 From: Ollo Date: Thu, 4 Feb 2021 20:55:03 +0100 Subject: [PATCH] Default page zero described --- esp32test/Esp32DeepSleepTest/include/DS2438.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/esp32test/Esp32DeepSleepTest/include/DS2438.h b/esp32test/Esp32DeepSleepTest/include/DS2438.h index 9529d93..3054f1a 100644 --- a/esp32test/Esp32DeepSleepTest/include/DS2438.h +++ b/esp32test/Esp32DeepSleepTest/include/DS2438.h @@ -42,6 +42,17 @@ #define DS2438_TEMPERATURE_DELAY 10 #define DS2438_VOLTAGE_CONVERSION_DELAY 8 +#define DEFAULT_PAGE0 uint8_t[8] { \ + 0b00001011 /* X, ADB=0, NVB=0, TB=0, AD=1, EE=0, CA=1, IAD=1 */, \ + 0, /* Temperatur */ \ + 0, /* Temperatur */ \ + 0, /* Voltage */ \ + 0, /* Voltage */ \ + 0, /* Current */ \ + 0, /* Current */ \ + 0 /* Threashold */ \ +} + typedef uint8_t DeviceAddress[8]; class DS2438 {