diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-03-12 21:46:43 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-03-12 21:46:43 +0100 |
commit | 31d40607ceaae5dcb78f41fcfe7dbd777f75d485 (patch) | |
tree | 58699d4a19421c956aa73071910fe2dce9a23cca /src/storage.h | |
parent | ad34553b5afe0e38fa06e372fdf616d540ceb888 (diff) |
preparations for >255byte patterns
the rest of the code (display etc.) isn't well-tested yet and will follow
in another commit
Diffstat (limited to 'src/storage.h')
-rw-r--r-- | src/storage.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/storage.h b/src/storage.h index cb99afd..e7feedb 100644 --- a/src/storage.h +++ b/src/storage.h @@ -15,6 +15,8 @@ class Storage { private: uint8_t num_anims; + uint8_t page_offset; + uint8_t header[2]; uint8_t first_free_page; uint8_t i2c_start_write(void); uint8_t i2c_start_read(void); @@ -83,6 +85,15 @@ class Storage { void load(uint8_t idx, uint8_t *data); /** + * Load partial pattern chunk (without header) from EEPROM. + * + * @param chunk 128 byte-offset inside pattern (starting with 0) + * @param data pointer to data structure for the pattern. Must be + * at least 128 bytes + */ + void loadChunk(uint8_t chunk, uint8_t *data); + + /** * Save (possibly partial) pattern on the EEPROM. 32 bytes of * dattern data will be read and stored, regardless of the * pattern header. |