diff options
author | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-22 16:04:25 +0100 |
---|---|---|
committer | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-22 16:04:25 +0100 |
commit | a4d13d607e5d7d6308c52f7a184290916ddd1296 (patch) | |
tree | a41170afd180000063b6187535c1f8e1578edb9c /src/modem.h | |
parent | d607d6234c2f78ed3896ea101872334e7ffa5240 (diff) | |
parent | d1d0e300d9c3a7d6289afcb0bfc544f5d9e81eee (diff) |
Merge branch 'master' of github.com:blinkenrocket/firmware
Diffstat (limited to 'src/modem.h')
-rw-r--r-- | src/modem.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modem.h b/src/modem.h index a37d7d8..18273f0 100644 --- a/src/modem.h +++ b/src/modem.h @@ -11,7 +11,7 @@ #include <stdlib.h> /* Modem ring buffer size must be power of 2 */ -#define MODEM_BUFFER_SIZE 4 +#define MODEM_BUFFER_SIZE 8 /* Modem defines */ #define MODEM_SYNC_LEN 42 @@ -23,12 +23,18 @@ #define MODEM_DDR DDRA class Modem { + private: + uint8_t buffer_head; + uint8_t buffer_tail; + uint8_t buffer[MODEM_BUFFER_SIZE]; + void buffer_put(const uint8_t c); public: Modem() {}; uint8_t buffer_available(void); uint8_t buffer_get(void); void enable(void); void disable(void); + void receive(void); }; extern Modem modem; |