Xbee API library with support SPI connection. (use only SPI supported model. see also http://www.digi.com/support/kbase/kbaseresultdetl?id=3362 )

Dependents:   XBeeWiFi_SPI_example

Fork of XBee by Suga koubou

Revision:
10:eb70be6ceb6d
Parent:
9:e32c2e5390d3
--- a/XBeeWiFi.cpp	Fri Jan 03 03:33:03 2014 +0000
+++ b/XBeeWiFi.cpp	Sat Jan 04 15:34:59 2014 +0000
@@ -21,12 +21,12 @@
 
 #define REVERSE_ENDIAN(x) (uint16_t)(((uint16_t)x >> 8) | ((uint16_t)x << 8))
 
-#ifdef XBEE_USE_UART
+#ifndef USE_XBEE_SPI
 XBeeWiFi::XBeeWiFi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts) : XBee(p_tx, p_rx, p_cts, p_rts) {
 }
 #endif
 
-#ifdef XBEE_USE_SPI
+#ifdef USE_XBEE_SPI
 XBeeWiFi::XBeeWiFi (PinName p_mosi, PinName p_miso, PinName p_sclk, PinName p_ssel, PinName p_attn, PinName p_reset) :
     XBee(p_mosi, p_miso, p_sclk, p_ssel, p_attn, p_reset) {
 }
@@ -120,7 +120,7 @@
     send(atRequest);
     r = getWiResponse(AT_COMMAND_RESPONSE, atRequest.getFrameId());
 
-#ifdef XBEE_USE_UART
+#ifndef USE_XBEE_SPI
     if (r == 0) {
         begin(b);
     }