summaryrefslogtreecommitdiff
path: root/src/system.cc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-02-16 22:29:02 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-02-16 22:29:02 +0100
commitefbaf777249a0846630bfab63f0e182b1a33ba56 (patch)
tree6145ba3a98b3e6d276cfd9bb1c1a5a270d6e4300 /src/system.cc
parent3a8a2ed58f61cd5f2913e8a71458208eaaf7e76e (diff)
Storage and a bit of System.receive documentation
Diffstat (limited to 'src/system.cc')
-rw-r--r--src/system.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/system.cc b/src/system.cc
index bee1791..5e705a6 100644
--- a/src/system.cc
+++ b/src/system.cc
@@ -42,6 +42,13 @@ void System::receive(void)
static uint16_t remaining_bytes = 0;
uint8_t rx_byte = modem.buffer_get();
+ /*
+ * START* and PATTERN* are sync signals, everything else needs to be
+ * stored on the EEPROM.
+ * (Note that the C++ standard guarantees "rxExpect > PATTERN2" to match
+ * for HEADER*, META* and DATA since they are located after PATTERN2
+ * in the RxExpect enum declaration)
+ */
if (rxExpect > PATTERN2) {
rx_buf[rx_pos] = modem.buffer_get();
}