4D display working with Gecko board STK3600

Dependents:   Genie_mbed_Gecko

Fork of 4dGENIE by christian b

Revision:
10:4d9f1be4a901
Parent:
9:b74deaac80f9
Child:
11:9196f72fc325
--- a/mbed_genie.cpp	Tue Jul 08 15:52:26 2014 +0000
+++ b/mbed_genie.cpp	Tue Jul 08 18:34:47 2014 +0000
@@ -20,6 +20,18 @@
     _screen.attach(this,&Mbed4dGenie::RxIrqHandler,Serial::RxIrq);
 }
 
+////////////////////// genieGetEventData ////////////////////////
+//
+// Returns the LSB and MSB of the event's data combined into
+// a single uint16
+//
+// The data is transmitted from the display in big-endian format 
+// and stored the same so the user can't just access it as an int 
+// directly from the structure. 
+//
+uint16_t Mbed4dGenie::genieGetEventData (genieFrame * e) {
+        return  (e->reportObject.data_msb << 8) + e->reportObject.data_lsb;
+}
 
 void Mbed4dGenie::RxIrqHandler(void)
 {