make USB (debug) serial console depend only on HAVE_PC compile variable draft

Tue, 11 Oct 2016 21:46:27 +0200

author
David Douard <david.douard@logilab.fr>
date
Tue, 11 Oct 2016 21:46:27 +0200
changeset 13
0fdeed7c083e
parent 12
38cd6267c919
child 14
5dfbcea0ebef

make USB (debug) serial console depend only on HAVE_PC compile variable

src/main.cpp file | annotate | diff | comparison | revisions
--- a/src/main.cpp	Tue Oct 11 21:45:22 2016 +0200
+++ b/src/main.cpp	Tue Oct 11 21:46:27 2016 +0200
@@ -26,7 +26,6 @@
 // misc
 #define DBGPIN PA_12
 
-
 #elif defined STM32F446xx
 // display
 #define DSP_MOSI PB_15
@@ -43,11 +42,11 @@
 // misc
 #define DBGPIN PC_0
 
-#define HAS_PC
-Serial pc(USBTX, USBRX);
-
 #endif
 
+#ifdef HAVE_PC
+Serial pc(USBTX, USBRX);
+#endif
 
 SSD1322 *dsp;//(10000000, DSP_MOSI, DSP_MISO, DSP_SCLK, DSP_CS, DSP_RST, DSP_DC, "SSD1322");
 HPSerial *hp; //(HP_RX, HP_TX);

mercurial