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:
14:d4092094dbfe
Parent:
13:184a08909405
Child:
15:37c83ec50ea0
--- a/DataLogger_Internal.cpp	Tue Feb 02 02:51:01 2021 +0000
+++ b/DataLogger_Internal.cpp	Fri Mar 05 08:20:02 2021 +0000
@@ -33,6 +33,9 @@
 // *******************************************************************************
 //          COM port settings are 9600 baud 8N1
 // *******************************************************************************
+#ifndef MAX40108_DEMO
+#define MAX40108_DEMO 1
+#endif // MAX40108_DEMO
 //---------- CODE GENERATOR: DataLogHelloCppCodeList
 // CODE GENERATOR: example code includes
 
@@ -2007,6 +2010,20 @@
 //Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART1 MAX32625PICO: P2_1,P2_0 (underside?)
 //Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32625PICO: P3_1,P3_0 (DAPLINK)
 //
+#if MAX40108_DEMO
+// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial is used as main serial port in MAX40108 Demo board
+Serial serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32625PICO: P0_1,P0_0 (pin 19/20)
+//    #define HAS_AUX_SERIAL 1
+//
+// Hardware serial port over DAPLink
+Serial DAPLINKserial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32625PICO: P3_1,P3_0 (DAPLINK)
+    #define HAS_DAPLINK_SERIAL 1
+//
+// Virtual serial port over USB
+//    #include "USBSerial.h"
+// The baud rate does not affect the virtual USBSerial UART.
+//USBSerial serial;
+#else // MAX40108_DEMO
 // TX/RX auxiliary UART port cmdLine_AUXserial AUXserial
 Serial AUXserial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32625PICO: P0_1,P0_0 (pin 19/20)
     #define HAS_AUX_SERIAL 1
@@ -2019,6 +2036,7 @@
     #include "USBSerial.h"
 // The baud rate does not affect the virtual USBSerial UART.
 USBSerial serial;
+#endif // MAX40108_DEMO
 //--------------------------------------------------
 #elif defined(TARGET_MAX32620FTHR)
 #warning "TARGET_MAX32620FTHR not previously tested; need to define serial pins..."