xbee communication for UWB quadcopter project Originally by Greg Abdo Forking to reduce impact of interrupt by moving packetbuilder out of the interrupt and letting be handled in the main loop

Fork of com by Prosper Van

Revision:
3:42e37cdab039
Parent:
2:bd1621102cad
--- a/com.cpp	Sun Apr 20 02:27:39 2014 +0000
+++ b/com.cpp	Sun Apr 20 17:08:47 2014 +0000
@@ -113,6 +113,7 @@
 
 void com::callback()
 {   
+    __disable_irq();
     while( xbeeRx.readable() )
     {
         char data = xbeeRx.getc(); 
@@ -125,6 +126,7 @@
         if( data == 255 )
             packetBuilder();
     }
+    __enable_irq();
 }
 
 //void com::api_callback()