Internal_Datalogger but with USB support removed (for MAX40108 Demo board), proof of concept that MAX32625 can be used successfully with VDDB(USB) left unpowered, as long as the USB library is not used.

Dependencies:   max32625pico CmdLine

Revision:
57:9bc5ad707216
Parent:
56:8469ffda6119
Child:
58:9b1e13e0527d
--- a/DataLogger_Internal.cpp	Fri Apr 15 22:19:14 2022 -0700
+++ b/DataLogger_Internal.cpp	Sat Apr 16 00:04:52 2022 -0700
@@ -3199,44 +3199,44 @@
 #if MAX40108_DEMO
     //
     // LED1 indicator on if (WE > 0.85V)
-    // L@0 act=1 pin=91 if=1 ch=3 x=0.8500 -- digitalOutLow D91 if A3 > 0.85
-    {action_digitalOutLow, pin_LED_1, condition_if_An_gt_threshold, channel_WE, 0.85},
+    // L@0 act=1 pin=91 if=1 ch=2 x=450.0000 -- Lpin=91 if A2 > 450.00 A2gtX=450.00 WE=0.77626
+    {action_digitalOutLow, pin_LED_1, condition_if_An_gt_threshold, channel_WE, 450.0000},
     //
     // LED1 indicator off if (WE < 0.80V)
-    // L@1 act=2 pin=91 if=2 ch=3 x=0.8000 -- digitalOutHigh D91 if A3 < 0.80
-    {action_digitalOutHigh, pin_LED_1, condition_if_An_lt_threshold, channel_WE, 0.80},
+    // L@1 act=2 pin=91 if=2 ch=2 x=350.0000 -- Hpin=91 if A2 < 350.00 A2ltX=350.00 WE=0.76626
+    {action_digitalOutHigh, pin_LED_1, condition_if_An_lt_threshold, channel_WE, 350.00},
     //
     // LED2 indicator on if (WE > 0.75V)
-    // L@2 act=1 pin=92 if=1 ch=3 x=0.7500 -- digitalOutLow D92 if A3 > 0.75
-    {action_digitalOutLow, pin_LED_2, condition_if_An_gt_threshold, channel_WE, 0.75},
+    // L@2 act=1 pin=92 if=1 ch=2 x=110.0000 -- Lpin=92 if A2 > 110.00 A2gtX=110.00 WE=0.74226
+    {action_digitalOutLow, pin_LED_2, condition_if_An_gt_threshold, channel_WE, 110.00},
     //
     // LED2 indicator off if (WE < 0.70V)
-    // L@3 act=2 pin=92 if=2 ch=3 x=0.7000 -- digitalOutHigh D92 if A3 < 0.70
-    {action_digitalOutHigh, pin_LED_2, condition_if_An_lt_threshold, channel_WE, 0.70},
+    // L@3 act=2 pin=92 if=2 ch=2 x=90.0000 -- Hpin=92 if A2 < 90.00 A2ltX=90.00 WE=0.74026
+    {action_digitalOutHigh, pin_LED_2, condition_if_An_lt_threshold, channel_WE, 90.00},
     //
     // LED3 indicator on if (WE > 0.65V)
-    // L@4 act=1 pin=93 if=1 ch=3 x=0.6500 -- digitalOutLow D93 if A3 > 0.65
-    {action_digitalOutLow, pin_LED_3, condition_if_An_gt_threshold, channel_WE, 0.65},
+    // L@4 act=1 pin=93 if=1 ch=2 x=45.0000 -- Lpin=93 if A2 > 45.00 A2gtX=45.00 WE=0.73576
+    {action_digitalOutLow, pin_LED_3, condition_if_An_gt_threshold, channel_WE, 45.00},
     //
     // LED3 indicator off if (WE < 0.60V)
-    // L@5 act=2 pin=93 if=2 ch=3 x=0.6000 -- digitalOutHigh D93 if A3 < 0.60
-    {action_digitalOutHigh, pin_LED_3, condition_if_An_lt_threshold, channel_WE, 0.60},
+    // L@5 act=2 pin=93 if=2 ch=2 x=35.0000 -- Hpin=93 if A2 < 35.00 A2ltX=35.00 WE=0.73476
+    {action_digitalOutHigh, pin_LED_3, condition_if_An_lt_threshold, channel_WE, 35.00},
     //
     // Free run if (WE > 0.70V)
-    // L@6 act=5 if=1 ch=3 x=0.7000 -- LR if A3 > 0.70
-    {action_trigger_FreeRun, 0, condition_if_An_gt_threshold, channel_WE, threshold_WE_0V7},
+    // L@6 act=5 if=1 ch=2 x=45.0000 -- run_LR if A2 > 45.00 A2gtX=45.00 WE=0.73576
+    {action_trigger_FreeRun, 0, condition_if_An_gt_threshold, channel_WE, 45.00},
     //
     // Deep Sleep if (WE < 0.60V)
-    // L@7 act=6 if=2 ch=3 x=0.6000 -- LT count=10 base=1000ms sleep=1 if A3 < 0.60
-    {action_trigger_Timer, 0, condition_if_An_lt_threshold, channel_WE, threshold_WE_0V6},
+    // L@7 act=6 if=2 ch=2 x=35.0000 -- LT count=10 base=500ms sleep=1 if A2 < 35.00 A2ltX=35.00 WE=0.73476
+    {action_trigger_Timer, 0, condition_if_An_lt_threshold, channel_WE, 35.00},
     //
     // Free run if (WE > 0.70V)
-    // L@8 act=3 pin=4 if=1 ch=3 x=0.7000 -- button %B4! if A3 > 0.70
-    {action_button, 4, condition_if_An_gt_threshold, channel_WE, threshold_WE_0V7},
+    // L@8 act=3 pin=4 if=1 ch=2 x=45.0000 -- btn=4 %B4! if A2 > 45.00 A2gtX=45.00 WE=0.73576
+    {action_button, 4, condition_if_An_gt_threshold, channel_WE, 45.00},
     //
     // Deep Sleep if (WE < 0.60V)
-    // L@9 act=3 pin=5 if=2 ch=3 x=0.6000 -- button %B5! if A3 < 0.60
-    {action_button, 5, condition_if_An_lt_threshold, channel_WE, threshold_WE_0V6},
+    // L@9 act=3 pin=5 if=2 ch=2 x=35.0000 -- btn=5 %B5! if A2 < 35.00 A2ltX=35.00 WE=0.73476
+    {action_button, 5, condition_if_An_lt_threshold, channel_WE, 35.00},
     //
 #endif // MAX40108_DEMO
     //
@@ -9455,7 +9455,7 @@
         // apply gain SPI_AIN_MathGainMulA[]
         // apply 1/gain SPI_AIN_MathGainDivA[]
         // display unit string Platform_MathUnitString[]
-        if (SPI_AIN_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_LSB) {
+        if (SPI_AIN_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Math_LSB) {
             // Perform calculations based on g_MAX11410_device.AINcode[Datalogger_action_table[i].condition_channel]
             // apply offset SPI_AIN_MathOffsetA[]
             // apply gain SPI_AIN_MathGainMulA[]
@@ -9471,7 +9471,7 @@
             // omit units from datalog numbers, confuses ms-excel #275
             // cmdLine.serial().printf("%s", SPI_AIN_MathUnitString[Datalogger_action_table[i].condition_channel]);
         }
-        if (SPI_AIN_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Volt) {
+        if (SPI_AIN_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Math_Volt) {
             // Perform calculations based on SPI_AIN_Voltage[Datalogger_action_table[i].condition_channel]
             // apply offset SPI_AIN_MathOffsetA[]
             // apply gain SPI_AIN_MathGainMulA[]
@@ -9498,7 +9498,7 @@
         // apply gain Platform_MathGainMulA[]
         // apply 1/gain Platform_MathGainDivA[]
         // display unit string Platform_MathUnitString[]
-        if (Platform_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_LSB) {
+        if (Platform_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Math_LSB) {
 #if LOG_PLATFORM_ANALOG_IN_LSB
             // Perform calculations based on Platform_LSB[Datalogger_action_table[i].condition_channel]
             // apply offset Platform_MathOffsetA[]
@@ -9516,7 +9516,7 @@
             // cmdLine.serial().printf("%s", Platform_MathUnitString[Datalogger_action_table[i].condition_channel]);
 #endif
         }
-        if (Platform_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Volt) {
+        if (Platform_Enable_Math_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Math_Volt) {
             // Perform calculations based on Platform_Voltage[Datalogger_action_table[i].condition_channel]
             // apply offset Platform_MathOffsetA[]
             // apply gain Platform_MathGainMulA[]