1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
-
-
- #ifndef __MEM_H__
- #define __MEM_H__
-
- #include "hardware/flash.h"
-
- #include <stdint.h>
- #include <stdbool.h>
-
- #include "sequence.h"
-
-
- #define EEPROM_FLASH_OFFSET (PICO_FLASH_SIZE_BYTES - FLASH_SECTOR_SIZE)
-
-
- #define MEM_VERSION 0
-
- struct mem_data {
- uint32_t boot_anim_ms;
-
- uint32_t ch_timings[NUM_CHANNELS];
- uint32_t ch_count;
- };
-
-
- #define MEM_DATA_INIT { \
- .boot_anim_ms = LOGO_INIT_MS, \
- .ch_count = NUM_CHANNELS, \
- }
-
- void mem_load(void);
- void mem_write(void);
- struct mem_data *mem_data(void);
- void mem_load_defaults(void);
-
- #endif
|