diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-02-16 18:33:49 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-02-16 18:33:49 +0100 |
commit | cc23ccbec8bb37ed78567410b60b23e8cd2603a9 (patch) | |
tree | 691a41ccd7943098ca433592608f29c5624d14d1 /src/storage.h | |
parent | 541b0f27054f27e661a71aa465e2df6e5a1c0b86 (diff) |
prepare state machine to receive animation messages
Diffstat (limited to 'src/storage.h')
-rw-r--r-- | src/storage.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/storage.h b/src/storage.h index 011406d..4336d34 100644 --- a/src/storage.h +++ b/src/storage.h @@ -4,6 +4,8 @@ class Storage { private: + uint8_t num_anims; + uint8_t first_free_page; void i2c_start_write(void); void i2c_start_read(void); void i2c_stop(void); @@ -13,8 +15,12 @@ class Storage { int8_t i2c_write(uint16_t addr, uint8_t len, uint8_t *data); // TODO "file system" housekeeping (index of first free page) public: - Storage() {}; + Storage() { num_anims = 0xff; first_free_page = 0;}; void enable(); + void reset(); + void load(uint16_t idx, uint8_t *data); + void save(uint16_t idx, uint8_t *data); + void append(uint8_t *data); // TODO load / save methods for animations }; |