ECE 4180 final project. Used to connected with both Adafruit Huzzah WiFi and Adafruit Bluetooth LE UART.

Dependents:   WirelessInterface_Demo

BTFriend.h

Committer:
gboggs3
Date:
2016-04-28
Revision:
1:67c95e75c998
Parent:
0:ee4d2deea4be

File content as of revision 1:67c95e75c998:

/*===================================================================
--------------------- BTFriend.h ----------------------
*Description

Written for:
    Georgia Institute of Technology
    ECE 4180, Final Project
    Dr. James Hamblen
    
Authors:
    Garren Boggs
    David Cox
    Anthony Jones
    Parth Patel
===================================================================*/

#ifndef __BTFriend_H__
#define __BTFriend_H__

#ifndef DEBUGMODE
#define DEBUGMODE 1
#endif

class BTFriend
{
public:
    BTFriend(PinName tx, PinName rx, PinName rst, RawSerial dev, int baudrate = 9600);    
    void reset();
    void setLocalSerial(RawSerial cmd, int baud = 9600);
    void setSerialDev(RawSerial dev, int baud = 9600);
    void baudrate(int speed);
    RawSerial getLocalSerial();
    RawSerial getSerialDev();
    
protected:
    RawSerial _cmd;
    RawSerial _dev;
    void send();
    void recv();
    
private:
    DigitalOut _rst;
};
#endif