2018-10-18 09:49:14 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
2018-10-20 07:11:23 +00:00
|
|
|
class CProtocol;
|
2018-10-18 09:49:14 +00:00
|
|
|
|
|
|
|
void Bluetooth_Init();
|
2018-10-20 11:28:32 +00:00
|
|
|
void Bluetooth_SendFrame(const char* pHdr, const CProtocol& Frame, bool lineterm=true);
|
2018-10-18 09:49:14 +00:00
|
|
|
void Bluetooth_Check();
|
|
|
|
|
2018-10-20 11:28:32 +00:00
|
|
|
extern void Command_Interpret(const char* pLine); // decodes received command lines, implemented in main .ino file!
|
|
|
|
|
|
|
|
struct sRxLine {
|
|
|
|
char Line[64];
|
|
|
|
int Len;
|
|
|
|
sRxLine() {
|
|
|
|
clear();
|
|
|
|
}
|
|
|
|
bool append(char val) {
|
|
|
|
if(Len < (sizeof(Line) - 1)) {
|
|
|
|
Line[Len++] = val;
|
|
|
|
Line[Len] = 0;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
void clear() {
|
|
|
|
Line[0] = 0;
|
|
|
|
Len = 0;
|
|
|
|
}
|
|
|
|
};
|
2018-10-18 09:49:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|