lighthouse

Dependencies:   RobotArmController SerialHalfDuplex mbed

Fork of PR_RobotArm by James Hilder

serial.h

Committer:
JessicaGao
Date:
2017-07-14
Revision:
2:55f39e7883a6

File content as of revision 2:55f39e7883a6:

#ifndef SERIAL_H
#define SERIAL_H

#include "mbed.h"
class SerialControl
{
public:
//void handle_user_serial_message(char * message, char length, char interface);

/**
 *  Sets the baud rates and enables the serial interfaces (PC and BT) as defined in the settings.h file
 *  Attaches listeners to both the serial ports that trigger when a message is received
 */
void setup_serial_interfaces(void);

private:
void IF_handle_command_serial_message(char message [3], char interface);
void IF_pc_rx_callback(void);
void IF_bt_rx_callback(void);
void IF_bt_message_timeout(void);

};
extern int turning;
extern Serial bt;
extern Serial pc;
#endif