This library controls the WNC. There is a derived class for usage from the K64F board.

Fork of WncControllerLibrary by Fred Kellerman

Files at this revision

API Documentation at this revision

Comitter:
fkellermavnet
Date:
Sat Sep 10 02:47:24 2016 +0000
Parent:
15:2c8211ef69e1
Child:
17:59b1e9341188
Commit message:
Made case better if WNC decides to not write back correct number of read data.

Changed in this revision

WncController.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/WncController.cpp	Sat Sep 10 02:32:47 2016 +0000
+++ b/WncController.cpp	Sat Sep 10 02:47:24 2016 +0000
@@ -1662,9 +1662,10 @@
             }
 
             // If data, convert the hex string into byte values
-            *numRead = i / 2;
+            i /= 2;
+            *numRead = i;
             while (i > 0) {
-                i -= 2;
+                i--;
                 *pS++ = (uint8_t)strtol(pRespStr->substr(pos_start, 2).c_str(), NULL, 16);
                 pos_start += 2;
             }