This library lets you connect an MRF24J40 tranceiver to your mbed. The MRF24J40 is intended for use as a zigbee or 6LowPan tranciever. However, it can also be used to simply send data from one tranceiver to another. The tranceiver is also available as a module on a small PCB with antenna etc. It requires no other components and can be connected to the mbed using 6 or 7 pins: MISO, MOSI, CLK, CS, WAKE, INT, RESET (optional). New: Added support for INT and WAKE pins. Added PrintBuffer function Added DebugDump function

Fork of MRF24J40 by Jeroen Hilgers

Revision:
3:f8a30ff66793
Parent:
1:55d2672c4708
diff -r d1e104b6ce31 -r f8a30ff66793 MRF24J40.h
--- a/MRF24J40.h	Wed Jan 07 15:50:58 2015 +0000
+++ b/MRF24J40.h	Wed Jan 07 22:03:56 2015 +0000
@@ -116,7 +116,7 @@
      * @param pin cs Pin connected to MRF's #CS.
      * @param pin reset Pin connected to MRF's #Reset.
      */
-    MRF24J40(PinName mosi, PinName miso, PinName sck, PinName cs, PinName reset);//, PinName irq, PinName wake);
+    MRF24J40(PinName mosi, PinName miso, PinName sck, PinName cs, PinName reset, PinName irq=NC, PinName wake=NC);
     
     /** Reset the MRF24J40 and initialize it.
      */
@@ -143,14 +143,16 @@
      */
     uint8_t Receive(uint8_t *data, uint8_t maxLength);  // Receive data if ready.
     
-    // void DebugDump(Serial &ser);
-
+    void DebugDump(Serial &ser);
+    
+    void PrintBuffer(Serial &ser, uint8_t *buffer, uint8_t bufferSize);
+    
   private:
     SPI mSpi;
     DigitalOut mCs;
     DigitalOut mReset;
-    // DigitalIn mIrq;
-    // DigitalIn mWake;
+    DigitalIn mIrq;
+    DigitalOut mWake;
 
     uint8_t ReadShort (uint8_t address);
     void WriteShort (uint8_t address, uint8_t data);