UART Driver to receive asynchronous Serial Comms from a Raspberry Pi and parse the results.

Files at this revision

API Documentation at this revision

Comitter:
sk398
Date:
Fri Mar 04 23:07:43 2016 +0000
Parent:
9:8e0a7d3f2f39
Child:
11:b5f4a9e69d96
Commit message:
Beginnings of checking included into getCommData method.; ; Need to add in legal ballast commands

Changed in this revision

SerialComms.cpp Show annotated file Show diff for this revision Revisions of this file
SerialComms.h Show annotated file Show diff for this revision Revisions of this file
--- a/SerialComms.cpp	Fri Mar 04 06:51:59 2016 +0000
+++ b/SerialComms.cpp	Fri Mar 04 23:07:43 2016 +0000
@@ -36,14 +36,6 @@
     incomingDataUpdate = FALSE;
 }
 
-#define MOTORS_FORWARD      0x09
-#define MOTORS_BACKWARD     0x06
-#define MOTORS_LEFT         0x05      
-#define MOTORS_RIGHT        0x0A
-#define MOTORS_ARM          0x01
-
-
-
 void SerialComms::incomingDataISR()
 {
     receiverBuffer = _HLC_Conn -> getc();
@@ -70,4 +62,5 @@
         incomingDataUpdate = FALSE;
         return 0xFF;
     }
+    return;
 }
--- a/SerialComms.h	Fri Mar 04 06:51:59 2016 +0000
+++ b/SerialComms.h	Fri Mar 04 23:07:43 2016 +0000
@@ -30,6 +30,14 @@
 #define TRUE 1
 #define FALSE 0
 
+#define MOTORS_FORWARD      0x09
+#define MOTORS_BACKWARD     0x06
+#define MOTORS_LEFT         0x05      
+#define MOTORS_RIGHT        0x0A
+#define MOTORS_ARM          0x01
+
+#define MAGNET_ON           0x0D
+#define MAGNET_OFF          0x0E
 
 class SerialComms
 {