1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
-
-
- #ifndef __MEM_H__
- #define __MEM_H__
-
- #include "hardware/flash.h"
- #include "pico/btstack_flash_bank.h"
-
- #include <stdint.h>
- #include <stdbool.h>
-
- #include "workflow.h"
- #include "wifi.h"
-
-
- #define EEPROM_FLASH_OFFSET (PICO_FLASH_BANK_STORAGE_OFFSET - FLASH_SECTOR_SIZE)
-
-
- #define MEM_VERSION 0
-
- struct mem_data {
-
-
- uint16_t net_count;
- struct net_credentials net[WIFI_MAX_NET_COUNT];
-
-
- uint16_t backlight;
- bool wf_auto_connect;
- bool enable_wifi;
-
-
- uint16_t wf_count;
- struct workflow wf[WF_MAX_FLOWS];
- };
-
-
- #define MEM_DATA_INIT { \
- .backlight = (0xFF00 >> 1), \
- .wf_auto_connect = false, \
- .enable_wifi = false, \
- .wf_count = 0, \
- .net_count = 0, \
- }
-
- void mem_load(void);
- void mem_write(void);
- struct mem_data *mem_data(void);
- void mem_load_defaults(void);
-
- #endif
|