-
Notifications
You must be signed in to change notification settings - Fork 0
/
Proto.h
45 lines (35 loc) · 598 Bytes
/
Proto.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
#ifndef PROTO_H
#define PROTO_H
#include <cstdio>
#include "mbed.h"
#define LPC_GPIO2_FIOPIN (int *) 0x2009C054
#define LPC_GPIO2_FIODIR (int *) 0x2009C040
#define LPC_PINCON_PINSEL4 (int *) 0x4002C010
#define LPC_PINCON_PINMODE4 (int *) 0x4002C050
using namespace std;
enum Command {
ERROR,
DOT1_ON,
DOT1_OFF,
DOT2_ON,
DOT2_OFF,
DOT3_ON,
DOT3_OFF,
DOT4_ON,
DOT4_OFF,
DOT5_ON,
DOT5_OFF,
DOT6_ON,
DOT6_OFF,
LIGHT_UP,
LIGHT_DOWN
};
class Proto {
private:
void _initGPIO();
public:
Proto();
Command getCommand(unsigned char value);
Command read();
};
#endif