Hexiwear library for communicating with the on-board KW40Z BLE device. KW40Z handles also the touch buttons.
Dependents: Hexi_Buttons_Example Hexi_Click_Relay-v2_Example Hexi_Click_Relay-v3_Example Hexi_Catch-the-dot_Game ... more
Diff: Hexi_KW40Z.cpp
- Revision:
- 10:1bed2b28ee18
- Parent:
- 9:8058541a8e2d
- Child:
- 11:a9a838035b87
--- 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++)
{