lighthouse

Dependencies:   RobotArmController SerialHalfDuplex mbed

Fork of PR_RobotArm by James Hilder

Committer:
JessicaGao
Date:
Fri Jul 14 12:32:18 2017 +0000
Revision:
2:55f39e7883a6
lighthouse;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JessicaGao 2:55f39e7883a6 1 #ifndef SERIAL_H
JessicaGao 2:55f39e7883a6 2 #define SERIAL_H
JessicaGao 2:55f39e7883a6 3
JessicaGao 2:55f39e7883a6 4 #include "mbed.h"
JessicaGao 2:55f39e7883a6 5 class SerialControl
JessicaGao 2:55f39e7883a6 6 {
JessicaGao 2:55f39e7883a6 7 public:
JessicaGao 2:55f39e7883a6 8 //void handle_user_serial_message(char * message, char length, char interface);
JessicaGao 2:55f39e7883a6 9
JessicaGao 2:55f39e7883a6 10 /**
JessicaGao 2:55f39e7883a6 11 * Sets the baud rates and enables the serial interfaces (PC and BT) as defined in the settings.h file
JessicaGao 2:55f39e7883a6 12 * Attaches listeners to both the serial ports that trigger when a message is received
JessicaGao 2:55f39e7883a6 13 */
JessicaGao 2:55f39e7883a6 14 void setup_serial_interfaces(void);
JessicaGao 2:55f39e7883a6 15
JessicaGao 2:55f39e7883a6 16 private:
JessicaGao 2:55f39e7883a6 17 void IF_handle_command_serial_message(char message [3], char interface);
JessicaGao 2:55f39e7883a6 18 void IF_pc_rx_callback(void);
JessicaGao 2:55f39e7883a6 19 void IF_bt_rx_callback(void);
JessicaGao 2:55f39e7883a6 20 void IF_bt_message_timeout(void);
JessicaGao 2:55f39e7883a6 21
JessicaGao 2:55f39e7883a6 22 };
JessicaGao 2:55f39e7883a6 23 extern int turning;
JessicaGao 2:55f39e7883a6 24 extern Serial bt;
JessicaGao 2:55f39e7883a6 25 extern Serial pc;
JessicaGao 2:55f39e7883a6 26 #endif