My fork

Dependencies:   WncControllerK64F

Fork of WNCInterface by Jan Korycan

Files at this revision

API Documentation at this revision

Comitter:
JMF
Date:
Tue Sep 27 19:50:40 2016 +0000
Parent:
4:99e7aeaceae7
Child:
6:7cda15f762fe
Commit message:
further cleanup of debug operation. There is a compile flag now if you want to see the WNC output during initialization. After initialization, you can call doDebug to enable or disable debug output.

Changed in this revision

WNCInterface.cpp Show annotated file Show diff for this revision Revisions of this file
WNCInterface.h Show annotated file Show diff for this revision Revisions of this file
--- a/WNCInterface.cpp	Tue Sep 27 19:22:03 2016 +0000
+++ b/WNCInterface.cpp	Tue Sep 27 19:50:40 2016 +0000
@@ -85,8 +85,12 @@
 int WNCInterface::init(const char* apn, MODSERIAL * debug) {
     int ret = 0;
 
-    if( debug )
+    if( debug ) {
         _pwnc = new WncControllerK64F_fk::WncControllerK64F::WncControllerK64F(&wncPinList, &mdmUart, debug);
+#if WNC_DEBUG == 1
+    _pwnc->enableDebug(1,1);
+#endif
+        }
     else
         _pwnc = new WncControllerK64F_fk::WncControllerK64F::WncControllerK64F(&wncPinList, &mdmUart, NULL);
 
@@ -169,4 +173,3 @@
     return NULL;
 }
 
-
--- a/WNCInterface.h	Tue Sep 27 19:22:03 2016 +0000
+++ b/WNCInterface.h	Tue Sep 27 19:50:40 2016 +0000
@@ -29,8 +29,8 @@
 #ifndef _WNCINTERFACE_H_
 #define _WNCINTERFACE_H_
 
-#define WNC_DEBUG   1   //1=enable the WNC debug port
-                                //0=disable the WNC debug port
+#define WNC_DEBUG   1   //1=enable the WNC startup debug output
+                                //0=disable the WNC startup debug output
 #define STOP_ON_FE  1   //1=hang forever if a fatal error occurs
                 //0=simply return failed response for all socket calls
 #define DISPLAY_FE  1   //1 to display the fatal error when it occurs
@@ -148,4 +148,3 @@
 
 #endif /* _WNCINTERFACE_ */
 
-