-
Notifications
You must be signed in to change notification settings - Fork 0
/
SerialManager.h
61 lines (35 loc) · 954 Bytes
/
SerialManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// SerialManager.h
// Glowdeck
//
// Created by Justin Kaufman on 8/17/17.
// Copyright © 2017 Justin Kaufman. All rights reserved.
//
#ifndef _SERIALMANAGER_H
#define _SERIALMANAGER_H
#include "GlobalClass.h"
class SerialManager: public Runnable {
public:
// SerialManager(uint8_t baudRate);
SerialManager(usb_serial_class *ser);
void setup();
void loop();
// Transmit directors
enum sendChannel { WIFI, BLUETOOTH };
void setSendChannel(sendChannel newChannel);
static void clearAll(void);
void btleSend(String tx);
void wifiSend(String tx);
void mainHandler(String raw);
static void mainClear(void);
static void logEvent(String event);
String mainBuffer;
private:
usb_serial_class sp;
sendChannel channel;
public:
friend class BootloaderManager;
friend class LEDManager;
friend class BluetoothManager;
};
#endif