Container for sending and receiving messages using the Manchester and ManchesterUART libararies.

Dependents:   Manchester_Transmitter Manchester_Receiver ManchesterUART_Transmitter ManchesterUART_Receiver

Container for sending and receiving messages using the Manchester and ManchesterUART libararies.

Files at this revision

API Documentation at this revision

Comitter:
hudakz
Date:
Mon Jul 30 09:38:57 2018 +0000
Parent:
0:260cfaa4e8b5
Commit message:
Updated.

Changed in this revision

ManchesterMsg.h Show annotated file Show diff for this revision Revisions of this file
diff -r 260cfaa4e8b5 -r 001100cee73a ManchesterMsg.h
--- a/ManchesterMsg.h	Wed Nov 22 16:47:58 2017 +0000
+++ b/ManchesterMsg.h	Mon Jul 30 09:38:57 2018 +0000
@@ -63,7 +63,7 @@
     template<class T>
     ManchesterMsg &operator<<(const T val) {
         if(len + sizeof(T) <= _max) {
-            *reinterpret_cast < T * > (&data[len]) = val;
+            memcpy(&data[len], &val, sizeof(T));
             len += sizeof(T);
         }