summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-02-16 18:33:49 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-02-16 18:33:49 +0100
commitcc23ccbec8bb37ed78567410b60b23e8cd2603a9 (patch)
tree691a41ccd7943098ca433592608f29c5624d14d1 /src/system.h
parent541b0f27054f27e661a71aa465e2df6e5a1c0b86 (diff)
prepare state machine to receive animation messages
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/system.h b/src/system.h
index 7c0ab80..a2aad25 100644
--- a/src/system.h
+++ b/src/system.h
@@ -10,8 +10,24 @@ class System {
private:
uint16_t want_shutdown;
void shutdown(void);
+ void receive(void);
+
+ enum RxExpect : uint8_t {
+ START1,
+ START2,
+ PATTERN1,
+ PATTERN2,
+ HEADER1,
+ HEADER2,
+ META1,
+ META2,
+ DATA
+ };
+
+ RxExpect rxExpect;
+
public:
- System() { want_shutdown = 0; };
+ System() { want_shutdown = 0; rxExpect = START1; };
/**
* Initial MCU setup. Turns off unused peripherals to save power