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.
Revision 0:fdd3f396de40, committed 2013-11-11
- Comitter:
- ndiaz6
- Date:
- Mon Nov 11 18:34:22 2013 +0000
- Commit message:
- yes
Changed in this revision
| CommModule.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r fdd3f396de40 CommModule.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CommModule.h Mon Nov 11 18:34:22 2013 +0000
@@ -0,0 +1,36 @@
+/**********************************
+ * Author: Clifton Thomas
+ * Date: 3/28/13
+ * Institution: Georgia Tech
+ *
+ * Title: Communication Module
+ * Class: ECE2035
+ * Assignment: Project 2
+ **********************************/
+
+#ifndef COMM_H
+#define COMM_H
+
+#include <string.h>
+#include "mbed.h"
+
+class commSerial: public Serial {
+public:
+ //constructor
+ commSerial(PinName tx, PinName rx, int baudrate): Serial(tx,rx) {
+ Serial::baud(baudrate);
+ }
+
+ //fcn to send data
+ void sendData(char *str) {
+ Serial::printf(str);
+ }
+
+ //fcn to receive data
+ void receiveData(char *buffer) {
+ Serial::scanf("%s", buffer);
+ }
+
+};
+
+#endif
\ No newline at end of file