Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: wifly.h
- Revision:
- 0:b5ee41a1ca65
diff -r 000000000000 -r b5ee41a1ca65 wifly.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wifly.h Thu Jun 16 22:05:55 2011 +0000
@@ -0,0 +1,38 @@
+/**
+ * Wrapper for the WiFly module, using the serial port.
+ *
+ * Copyright 2010 Pulse-Robotics, Inc.
+ * John Sosoka, Tyler Wilson
+ */
+
+#ifndef __wifly_h__
+#define __wifly_h__
+
+#include "mbed.h"
+
+
+class WiFly {
+
+public:
+ /** Create a WiFly object connected to the specified serial pins
+ *
+ * @param tx TX pin of the Serial port
+ * @param rx RX pin of the Serial port
+ */
+ WiFly(PinName tx, PinName rx);
+
+ void commandMode() const;
+ void dataMode() const;
+
+ // Serial methods. Could also derive from Serial...
+ void baud(int baudrate=9600);
+ int getc();
+ void putc(int c);
+ int readable();
+
+private:
+ Serial* port;
+};
+
+
+#endif /* __wifly_h__ */
\ No newline at end of file