TUB-MRT / btbee

Fork of btbee by Nikolas Goldin

Files at this revision

API Documentation at this revision

Comitter:
ngoldin
Date:
Thu May 16 10:24:06 2013 +0000
Child:
1:56f437e4d9e0
Commit message:
first commit. ;

Changed in this revision

btbee.cpp Show annotated file Show diff for this revision Revisions of this file
btbee.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btbee.cpp	Thu May 16 10:24:06 2013 +0000
@@ -0,0 +1,20 @@
+#include "btbee.h"
+
+btbee::btbee(PinName respin, PinName tx, PinName rx) : 
+  Serial(tx,  rx) , reset_out(respin) 
+{
+  reset_out.write(1); 
+}
+
+btbee::btbee( ) : 
+  Serial(p28,p27),  reset_out(p26)
+{
+  reset_out.write(1); 
+}
+
+void btbee::reset(void){
+reset_out.write(0);
+wait(0.01);
+reset_out.write(1);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btbee.h	Thu May 16 10:24:06 2013 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include "platform.h"
+
+class btbee: public Serial{
+ public: 
+  btbee(PinName respin, PinName tx, PinName rx);
+  btbee(void);
+  void reset(void);
+
+ protected:
+  DigitalOut reset_out;
+};
\ No newline at end of file