Radio Structures in OOP

Dependencies:   mbed mbed-rtos

Revision:
2:7d523bdd2f50
Child:
6:4a3dbfbc30f1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utils/RTP.h	Sun Dec 28 06:05:17 2014 +0000
@@ -0,0 +1,25 @@
+#ifndef REAL_TIME_PACKET_H
+#define REAL_TIME_PACKET_H
+
+#include "mbed.h"
+
+#define RTP_MAX_DATA_SIZE 32
+
+typedef struct _RTP_t {
+    uint8_t size;
+    union {
+        struct {
+            union {
+                uint8_t header;
+                struct {
+                    uint8_t port;
+                    uint8_t subclass;
+                };
+            };
+            uint8_t data[RTP_MAX_DATA_SIZE];
+        };
+        uint8_t raw[RTP_MAX_DATA_SIZE + 1];
+    };
+} RTP_t;
+
+#endif  // REAL_TIME_PACKET_H