Digi XBeeLib fixed for NonCopyable issue

Dependents:   XBeeZB_Receive_Data

Fork of XBeeLib by Digi International Inc.

This lib fixes NonCopyable<T> issues of Digi XBeeLib. Also, lib has been reworked in order to make it RTOS-aware, overcoming several others issues due to stdio Mutex operations.

Revision:
3:8662ebe83570
Parent:
0:fcaad0dfa051
Child:
4:629712865107
--- a/IO/IOSample802.cpp	Thu May 14 16:21:39 2015 +0200
+++ b/IO/IOSample802.cpp	Mon May 18 13:16:55 2015 +0200
@@ -1,3 +1,15 @@
+/**
+ * Copyright (c) 2015 Digi International Inc.,
+ * All rights not expressly granted are reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
+ * =======================================================================
+ */
+
 #include "XBeeLib.h"
 #include "IO/IOSample802.h"
 #include "Utils/Debug.h"
@@ -10,6 +22,10 @@
 
 IOSample802::IOSample802(const uint8_t* const raw_data, size_t size)
 {
+    if (raw_data == NULL || size == 0) {
+        _channel_mask = 0;
+        return;
+    }
     assert(size >= IO_SAMPLE_802_MIN_SIZE);
     assert(size <= sizeof _sampled_data);