Initial Fork

Dependencies:   CRC16

Dependents:   eBot_Firmware_V1

Fork of SWSPI by Dave Van Wagner

Committer:
Throwbot
Date:
Sun Oct 05 12:21:30 2014 +0000
Revision:
2:c13831ca234c
Parent:
1:faa9f74488ba
Bluetooth lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Throwbot 1:faa9f74488ba 1 #ifndef HC05_H
Throwbot 1:faa9f74488ba 2 #define HC05_H
Throwbot 1:faa9f74488ba 3
Throwbot 1:faa9f74488ba 4 #include "mbed.h"
Throwbot 2:c13831ca234c 5 #include "rtos.h"
Throwbot 2:c13831ca234c 6 #include "MODSERIAL.h"
Throwbot 2:c13831ca234c 7 #include "CRC16.h"
Throwbot 1:faa9f74488ba 8
Throwbot 2:c13831ca234c 9 #define BUFFER_SIZE 512
Throwbot 2:c13831ca234c 10
Throwbot 2:c13831ca234c 11 class HC05 : public MODSERIAL, public Mutex, public CRC16
Throwbot 1:faa9f74488ba 12 {
Throwbot 1:faa9f74488ba 13 private:
Throwbot 1:faa9f74488ba 14 public:
Throwbot 2:c13831ca234c 15 char buffer[BUFFER_SIZE];
Throwbot 2:c13831ca234c 16
Throwbot 2:c13831ca234c 17 DigitalOut on_switch;
Throwbot 1:faa9f74488ba 18
Throwbot 2:c13831ca234c 19 HC05(PinName tx_pin, PinName rx_pin, PinName en_pin);
Throwbot 2:c13831ca234c 20 int printfCRC( const char * format, ... );
Throwbot 2:c13831ca234c 21 void printBufferCRC();
Throwbot 2:c13831ca234c 22 void start();
Throwbot 2:c13831ca234c 23 void stop();
Throwbot 2:c13831ca234c 24
Throwbot 1:faa9f74488ba 25 };
Throwbot 1:faa9f74488ba 26
Throwbot 1:faa9f74488ba 27 #endif