Simple xbee library based on the Serial class with added reset signaling

Dependents:   m3Dpi

Revision:
0:a4621ef93d99
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xbee.cpp	Fri Nov 06 18:49:29 2015 +0000
@@ -0,0 +1,21 @@
+#include "xbee.h"
+
+
+Xbee::Xbee(PinName tx, PinName rx, PinName _reset, const char* name) : Serial(tx, rx, name), rst(_reset)
+{
+    disable();
+}
+
+void Xbee::enable(){
+    rst = 1;
+}
+
+void Xbee::disable(){
+    rst = 0;
+}
+
+void Xbee::reset(){
+    disable();
+    wait_ms(1);
+    enable();
+}
\ No newline at end of file