Index: branches/wireless/code/lib/include/libdragonfly/time.h
===================================================================
--- branches/wireless/code/lib/include/libdragonfly/time.h	(revision 1615)
+++ branches/wireless/code/lib/include/libdragonfly/time.h	(revision 1616)
@@ -61,8 +61,10 @@
 /** @brief Four seconds **/
 #define FOUR_SECOND 64
 
-/** @brief Delay execution for the specified time **/
-void delay_ms(int ms) ;
+/** @brief Delay execution for the specified time in milliseconds. **/
+void delay_ms(uint16_t ms);
+/** @brief Delay execution for the specified time in microseconds. **/
+void delay_us(uint16_t us);
 /** @brief Enable the realtime clock **/
 int rtc_init(int prescale_opt, void (*rtc_func)(void));
 /** @brief Reset the counter of the realtime clock **/
Index: branches/wireless/code/lib/include/libdragonfly/serial.h
===================================================================
--- branches/wireless/code/lib/include/libdragonfly/serial.h	(revision 1615)
+++ branches/wireless/code/lib/include/libdragonfly/serial.h	(revision 1616)
@@ -107,40 +107,9 @@
 /** @brief Print a fixed width hexadecimal representation to USB **/
 int usb_puth8(uint8_t value);
 /** @brief Alias for usb_puth16 **/
-static inline void usb_puth (uint16_t value) { usb_puth16 (value); };
+static inline void usb_puth(uint16_t value) { usb_puth16 (value); };
 
-
 /** @} **/ //end addtogroup
 
-/**
- * @defgroup xbee XBee Input / Output
- * @brief Functions for XBee input / output
- *
- * Low level functions for XBee input and output.
- *
- * @{
- **/
-
-// if no baud rate is defined for usb, default is set here
-
-// if no baud rate is defined for xbee, default is set here
-#ifndef XBEE_BAUD
-/** @brief the XBee baud rate **/
-#define XBEE_BAUD 9600
 #endif
 
-/** @brief Initialize the XBee **/
-int xbee_init(void);
-/** @brief Print a character to the XBee **/
-int xbee_putc(char c);
-/** @brief Read a character from the XBee **/
-int xbee_getc(void);
-/** @brief Read a character from the XBee without blocking **/
-int xbee_getc_nb(char *c);
-
-
-
-/** @} **/ //end addtogroup
-
-#endif
-
Index: branches/wireless/code/lib/bin/libdragonfly.a
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branches/wireless/code/projects/libwireless/xbee.c
===================================================================
--- branches/wireless/code/projects/libwireless/xbee.c	(revision 1615)
+++ branches/wireless/code/projects/libwireless/xbee.c	(revision 1616)
@@ -42,8 +42,6 @@
 
 /* Internal Function Prototypes */
 
-// TODO: convert all int references to int16_t syntax (see stdint.h)
-
 /* I/O Functions */
 static int8_t xbee_send_string(uint8_t* c);
 
@@ -56,7 +54,7 @@
 static int8_t xbee_wait_for_ok(void);
 
 /* API Mode Functions */
-static int8_t xbee_handle_packet(uint8_t* packet, uint16_t len);
+//TODO: does this exist?  static int8_t xbee_handle_packet(uint8_t* packet, uint16_t len);
 static int8_t xbee_handle_at_command_response(uint16_t command, uint8_t result, uint8_t len);
 static int8_t xbee_handle_at_command_response(uint16_t command, uint8_t result, uint8_t len);
 static void xbee_handle_status(uint8_t status);
@@ -71,9 +69,20 @@
 uint8_t xbee_basic_buf_get(uint8_t *ptr);
 int8_t xbee_other_buf_add(uint8_t *ptr, uint8_t byte);
 
+/* private functions */
+int8_t check_last_receive(uint16_t source,uint8_t framenum);
+inline uint8_t getStatus(uint8_t mask);
+inline void setStatus(uint8_t mask,uint8_t value);
 
 /*Global Variables*/
 
+// last few packet sources and frame nums
+#define NUM_LAST_PACKETS 10
+struct {
+  uint16_t source;
+  uint8_t framenum;
+} lastPacket[NUM_LAST_PACKETS];
+
 // array for basic packets
 static uint8_t xbee_basic_buf[PACKET_BUFFER_SIZE];
 
@@ -95,14 +104,17 @@
 static uint8_t other_buf_last = 0;
 
 // xbee status
-#define XBEE_API_OFF 0x0
-#define XBEE_API_ON 0x1
-#define XBEE_API_ESCAPE 0x2
-#define XBEE_NORMAL 0x00
+#define XBEE_API_OFF 0x00
+#define XBEE_API_ON 0x10
+#define XBEE_API_ESCAPE 0x20
+#define XBEE_API_MASK 0x30
 #define XBEE_COMMAND_WAIT 0x80
 #define XBEE_COMMAND_RESPONSE 0xC0
-#define XBEE_INITD 0x08
-static uint8_t xbee_status = XBEE_API_OFF|XBEE_NORMAL;
+#define XBEE_COMMAND_NONE 0x00
+#define XBEE_COMMAND_MASK 0xC0
+#define XBEE_NOT_INITD 0xF0
+#define LAST_PACKET_MASK 0x0F
+uint8_t xbee_status = XBEE_NOT_INITD;
 
 // xbee command response (for PAN, channel, address, etc)
 static uint8_t xbee_command[4];
@@ -136,9 +148,9 @@
   uint16_t len=0;
   
   // check that we're in API mode
-  if ((xbee_status&0x03) == XBEE_API_OFF || apitype != XBEE_FRAME_START) {
+  if (getStatus(XBEE_API_MASK) == XBEE_API_OFF || apitype != XBEE_FRAME_START) {
     // not in API mode
-    if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT) {
+    if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT) {
       // get rest of command and put in basic buf
       xbee_basic_buf[0] = apitype;
       if (xbee_basic_buf[i] != '\r') {
@@ -151,7 +163,7 @@
         }
       }
       // signal handler that command response is done
-      xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_RESPONSE;
+      setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_RESPONSE);
     }
     return;
   }
@@ -174,7 +186,7 @@
   switch(apitype) {
   case XBEE_FRAME_AT_COMMAND_RESPONSE: {
     // AT command response
-    if ((xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+    if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
       return; // we're currently processing a command, so drop the incoming one
     uint16_t atcommand=0;
     uint8_t ptr=basic_buf_last;
@@ -235,7 +247,7 @@
           apitype = PORT; // get options, and ignore
         else if (i==5) {
           framenum = PORT; // get the frame number
-          if (check_last_receive(source,framenum) != 0) {  // TODO: write function
+          if (check_last_receive(source,framenum) != WL_SUCCESS) {
             // we've already received this frame
             ptr = 0xFF; // signal to skip processing
             break;
@@ -334,7 +346,30 @@
   return 0;
 }
 
+/**
+ * Checks if packet is a duplicate
+ **/
+int8_t check_last_receive(uint16_t source,uint8_t framenum) {
+  uint8_t i=0;
+  for(;i<NUM_LAST_PACKETS;i++) {
+    if (lastPacket[i].source == source && lastPacket[i].framenum == framenum)
+      return -1; // duplicate packet, so return error
+  }
+  // save packet source and framenum
+  i=getStatus(LAST_PACKET_MASK);
+  lastPacket[i].source = source;
+  lastPacket[i].framenum = framenum;
+  if (++i>=NUM_LAST_PACKETS)
+    i = 0;
+  setStatus(LAST_PACKET_MASK,i);
+  return WL_SUCCESS;
+}
 
+/** status functions **/
+inline uint8_t getStatus(uint8_t mask) { return xbee_status&mask; }
+inline void setStatus(uint8_t mask,uint8_t value) { xbee_status = (xbee_status&(!mask))|value; }
+
+
 /**
  * Initializes the XBee library so that other functions may be used.
  **/
@@ -342,10 +377,14 @@
 {
 	WL_DEBUG_PRINT("in xbee_init\n");
   
-  if((xbee_status&0x08) == XBEE_INITD) {
+  if(getStatus(XBEE_NOT_INITD) != XBEE_NOT_INITD) {
     return WL_ERROR_INIT_ALREADY_INITD;
   }
   
+  // clear last packet buffer
+  for(int i=0;i<NUM_LAST_PACKETS;i++)
+    lastPacket[i].source = lastPacket[i].framenum = 0;
+  
   // Set startup baud rate of 9600
 	// Set frame format: 8data, 1stop bit, asynchronous normal mode
   // Enable receiver and transmitter and the receiving interrupt
@@ -471,7 +510,7 @@
   
   
   // set status
-  xbee_status |= XBEE_INITD;
+  setStatus(XBEE_NOT_INITD,XBEE_COMMAND_NONE);
   
 	return WL_SUCCESS;
 }
@@ -485,7 +524,7 @@
     WL_DEBUG_PRINT("xbee termination failed\r\n");
     return WL_ERROR_TERMINATION_FAILED;
   }
-  xbee_status = xbee_status&0xF7; // clean initd status
+  setStatus(XBEE_NOT_INITD,XBEE_NOT_INITD); // clean initd status
   return WL_SUCCESS;
 }
 
@@ -496,8 +535,6 @@
  * @return 0 for success, nonzero for failure
  **/
 int8_t xbee_putc(uint8_t c) {
-  if(!(xbee_status&XBEE_INITD))
-    return WL_ERROR_LIBRARY_NOT_INITD;
 
   // Wait until buffer is clear for sending
   // Then load buffer with your character
@@ -523,9 +560,7 @@
  * @see xbee_init, xbee_getc_nb
  **/
 int16_t xbee_getc(void) {
-  if(!(xbee_status&XBEE_INITD))
-    return WL_ERROR_LIBRARY_NOT_INITD;
-
+    
   // Wait for the receive buffer to be filled
   // Then read the receive buffer
 #ifdef FIREFLY
@@ -549,8 +584,6 @@
  * @see xbee_getc
  **/
 int8_t xbee_getc_nb(uint8_t *c) {
-  if(!(xbee_status&XBEE_INITD))
-    return WL_ERROR_LIBRARY_NOT_INITD;
 
   // check if the receive buffer is filled
 #ifdef FIREFLY
@@ -571,7 +604,7 @@
  * @param buf the buffer of data to send
  * @param size the number of bytes to send
  **/
-static int8_t xbee_send(uint8_t* buf, uint16_t size)
+int8_t xbee_send(uint8_t* buf, uint16_t size)
 {
   uint16_t i=0; // check if we need this variable
 	while(i<size) {
@@ -633,7 +666,7 @@
 	}
 	xbee_wait_for_ok();
   
-  xbee_status = (xbee_status&0xFC)|XBEE_API_ON;
+  setStatus(XBEE_API_MASK,XBEE_API_ON); // set status
 
 	return WL_SUCCESS;
 }
@@ -647,7 +680,7 @@
 	}
 	xbee_wait_for_ok();
   
-  xbee_status = (xbee_status&0xFC)|XBEE_API_ESCAPE;
+  setStatus(XBEE_API_MASK,XBEE_API_ESCAPE); // set status
   
 	return WL_SUCCESS;
 }
@@ -657,16 +690,16 @@
  **/
 static int8_t xbee_exit_api_mode()
 {
-	if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND; // can't do command right now
   
   int16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_modify_at_command((uint8_t*)"AP",(uint8_t*)"0",1); // send command
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'A' && xbee_command[1] == 'P')
@@ -673,7 +706,7 @@
     i = WL_SUCCESS;
   else
     i = WL_ERROR_XBEE_COMMAND; // set error code
-  xbee_status = (xbee_status&0x3C)|XBEE_API_OFF; // reset status
+  setStatus(XBEE_API_MASK,XBEE_API_OFF); // reset status
 	return (int8_t)i; // return
 }
 
@@ -697,9 +730,9 @@
 static int8_t xbee_wait_for_string(uint8_t* s, uint16_t len)
 {
   uint8_t i=0;
-  if ((xbee_status&0x03) == XBEE_API_OFF) {
+  if (getStatus(XBEE_API_MASK) == XBEE_API_OFF) {
     // wait until the response is received (only wait 1 second)
-    while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 1000) {
+    while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 1000) {
       delay_us(1);
     }
     // check response
@@ -711,8 +744,7 @@
       return -1;
     }
     
-    // clear response
-    xbee_status = xbee_status&0x3F;
+    setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // clear status
   }
 
 	return 0;
@@ -729,9 +761,9 @@
  */
 static int8_t xbee_wait_for_response(uint8_t* s, int16_t len) {
   uint8_t i=0;
-  if ((xbee_status&0x03) == XBEE_API_OFF) {
+  if (getStatus(XBEE_API_MASK) == XBEE_API_OFF) {
     // wait until the response is received (only wait 1 second)
-    while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 1000) {
+    while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 1000) {
       delay_us(1);
     }
     // check response
@@ -741,7 +773,7 @@
       i=strcspn((char*)xbee_basic_buf,"\r");
       if (i<PACKET_BUFFER_SIZE) {
         memcpy(s,xbee_basic_buf,i);
-        xbee_status = xbee_status&0x3F; // clear response
+        setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // clear response
         return 0;
       }
       else
@@ -805,7 +837,7 @@
  *
  * @return error code
  **/
-static int8_t xbee_checksum_add(uint8_t *buf, uint8_t len, uint8_t* sum) {
+int8_t xbee_checksum_add(uint8_t *buf, uint8_t len, uint8_t* sum) {
   if (buf == NULL || sum == NULL)
     return WL_ERROR_ARGUMENT;
   while(--len > 0) {
@@ -812,6 +844,7 @@
 		*sum += buf[len];
   }
   *sum += buf[0];
+  return WL_SUCCESS;
 }
 
 
@@ -823,7 +856,7 @@
  * @param len the size in bytes of the packet data
  *
  **/
-static int8_t xbee_send_header(uint8_t type, uint16_t len)
+int8_t xbee_send_header(uint8_t type, uint16_t len)
 {  
   //packet prefix
   if (xbee_putc(XBEE_FRAME_START) != WL_SUCCESS)
@@ -1056,7 +1089,7 @@
   }
   
   // signal handler that command response is done
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_RESPONSE;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE);
 
   return WL_SUCCESS;
 }
@@ -1068,16 +1101,16 @@
  **/
 int8_t xbee_set_pan_id(uint16_t id)
 {
-	if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND; // can't do command right now
   
   int16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_modify_at_command((uint8_t*)"ID",(uint8_t*)(&id),2); // send command to set the channel
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'O' && xbee_command[1] == 'K')
@@ -1084,7 +1117,7 @@
     i = WL_SUCCESS;
   else
     i = WL_ERROR_XBEE_COMMAND; // set error code
-  xbee_status = xbee_status&0x3F; // reset status
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // reset status
 	return (int8_t)i; // return
 }
 
@@ -1096,16 +1129,16 @@
  **/
 uint16_t xbee_get_pan_id()
 {
-  if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND_16BIT; // can't do command right now
   
   uint16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_read_at_command((uint8_t*)"ID"); // send command to get the PAN
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'I' && xbee_command[1] == 'D')
@@ -1112,7 +1145,7 @@
     i = (xbee_command[2]<<8)|xbee_command[3]; // get PAN
   else
     i = WL_ERROR_XBEE_COMMAND_16BIT; // set error code
-  xbee_status = xbee_status&0x3F; // reset status
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // reset status
 	return i; // return
 }
 
@@ -1132,16 +1165,16 @@
 		return -1;
 	}
 
-	if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND; // can't do command right now
   
   int16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_modify_at_command((uint8_t*)"CH",&channel,1); // send command to set the channel
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'O' && xbee_command[1] == 'K')
@@ -1148,7 +1181,7 @@
     i = WL_SUCCESS;
   else
     i = WL_ERROR_XBEE_COMMAND; // set error code
-  xbee_status = xbee_status&0x3F; // reset status
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // reset status
 	return (int8_t)i; // return
 }
 
@@ -1161,16 +1194,16 @@
  **/
 int8_t xbee_get_channel(void)
 {
-  if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND; // can't do command right now
   
   int16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_read_at_command((uint8_t*)"ID"); // send command to get the channel
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'C' && xbee_command[1] == 'H')
@@ -1177,7 +1210,7 @@
     i = xbee_command[2]; // get channel
   else
     i = WL_ERROR_XBEE_COMMAND; // set error code
-  xbee_status = xbee_status&0x3F; // reset status
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // reset status
 	return i; // return
 }
 
@@ -1190,16 +1223,16 @@
  **/
 uint16_t xbee_get_address(void)
 {
-  if ((xbee_status&0xC0) == XBEE_COMMAND_WAIT
-    || (xbee_status&0xC0) == XBEE_COMMAND_RESPONSE)
+	if (getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_WAIT
+    || getStatus(XBEE_COMMAND_MASK) == XBEE_COMMAND_RESPONSE)
     return WL_ERROR_XBEE_COMMAND_16BIT; // can't do command right now
   
   uint16_t i=0;
   // change status to command wait
-  xbee_status = (xbee_status&0x3F)|XBEE_COMMAND_WAIT;
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_WAIT);
   xbee_send_read_at_command((uint8_t*)"MY"); // send command to get the address
   // wait for up to 30 ms
-  while((xbee_status&0xC0) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
+  while(getStatus(XBEE_COMMAND_MASK) != XBEE_COMMAND_RESPONSE && i++ < 10000) {
     delay_us(1); // wait 3us
   }
   if (i < 1000 && xbee_command[0] == 'M' && xbee_command[1] == 'Y')
@@ -1206,7 +1239,7 @@
     i = (xbee_command[2]<<8)+xbee_command[3]; // get address
   else
     i = WL_ERROR_XBEE_COMMAND_16BIT; // set error code
-  xbee_status = xbee_status&0x3F; // reset status
+  setStatus(XBEE_COMMAND_MASK,XBEE_COMMAND_NONE); // reset status
 	return i; // return
 }
 
Index: branches/wireless/code/projects/libwireless/xbee.h
===================================================================
--- branches/wireless/code/projects/libwireless/xbee.h	(revision 1615)
+++ branches/wireless/code/projects/libwireless/xbee.h	(revision 1616)
@@ -123,11 +123,11 @@
 /**@brief Read a byte from the xbee (nonblocking) **/
 int8_t xbee_getc_nb(uint8_t *c);
 /**@brief Send an array of bytes to the xbee **/
-static int8_t xbee_send(uint8_t* buf, uint16_t size);
+int8_t xbee_send(uint8_t* buf, uint16_t size);
 /**@brief Add a buffer to the checksum value **/
-static int8_t xbee_checksum_add(uint8_t *buf, uint8_t len, uint8_t* sum);
+int8_t xbee_checksum_add(uint8_t *buf, uint8_t len, uint8_t* sum);
 /**@brief Send a frame header to the xbee **/
-static int8_t xbee_send_header(uint8_t type, uint16_t len);
+int8_t xbee_send_header(uint8_t type, uint16_t len);
 /**@brief Send a packet to the XBee **/
 int8_t xbee_send_packet(uint8_t* packet, uint8_t len, uint16_t dest, uint8_t options, uint8_t frame);
 /**@brief Set the PAN ID for the XBee **/
