Hexiwear library for communicating with the on-board KW40Z BLE device. KW40Z handles also the touch buttons.
Dependents: Hexi_BLE_Example_Modified Hexi_BLE_Example_ModifiedPOTATO
Fork of Hexi_KW40Z by
Diff: Hexi_KW40Z.cpp
- Revision:
- 10:1bed2b28ee18
- Parent:
- 9:8058541a8e2d
- Child:
- 11:a9a838035b87
diff -r 8058541a8e2d -r 1bed2b28ee18 Hexi_KW40Z.cpp --- a/Hexi_KW40Z.cpp Mon Sep 26 01:37:59 2016 +0000 +++ b/Hexi_KW40Z.cpp Mon Sep 26 02:36:12 2016 +0000 @@ -171,7 +171,9 @@ if(gHostInterface_rxConfirmMask == (txPacket->start2 & gHostInterface_rxConfirmMask)) { confirmRequested = true; +#if defined (LIB_DEBUG) pc.printf("Found confirmRequested\r\n"); +#endif } do @@ -725,6 +727,11 @@ { char * idx = (char *)packet; uint8_t length = packet->length + gHostInterface_headerSize + 1; + + if(length > (gHostInterface_dataSize + gHostInterface_headerSize + 1)) + { + length = gHostInterface_dataSize + gHostInterface_headerSize + 1; + } for(uint8_t i = 0; i < length; i++) {