11 #include "stm32f4xx.h" 12 #include "stm32f4xx_hal.h" 13 #define SE3_FLASH_S0 (FLASH_SECTOR_10) 14 #define SE3_FLASH_S1 (FLASH_SECTOR_11) 15 #define SE3_FLASH_S0_ADDR ((uint32_t)0x080C0000) 16 #define SE3_FLASH_S1_ADDR ((uint32_t)0x080E0000) 17 #define SE3_FLASH_SECTOR_SIZE (128*1024) 136 SE3_FLASH_MAGIC_SIZE = 32,
137 SE3_FLASH_INDEX_SIZE = 2016,
138 SE3_FLASH_BLOCK_SIZE = 64,
139 SE3_FLASH_NODE_MAX = (4 * 1024),
140 SE3_FLASH_NODE_DATA_MAX = (SE3_FLASH_NODE_MAX - 2)
bool se3_flash_it_delete(se3_flash_it *it)
Delete flash node.
Definition: se3_flash.c:372
bool se3_flash_it_write(se3_flash_it *it, uint16_t off, const uint8_t *data, uint16_t size)
Write to flash node.
Definition: se3_flash.c:256
Not written yet.
Definition: se3_flash.h:131
L0 structures and functions.
Flash node iterator structure.
Definition: se3_flash.h:34
bool se3_flash_pos_delete(size_t pos)
Delete flash node by index.
Definition: se3_flash.c:357
bool se3_flash_it_new(se3_flash_it *it, uint8_t type, uint16_t size)
Allocate new node.
Definition: se3_flash.c:306
struct se3_flash_it_ se3_flash_it
Flash node iterator structure.
size_t se3_flash_unused()
Get unused space.
Definition: se3_flash.c:301
void se3_flash_it_init(se3_flash_it *it)
Initialize flash iterator.
Definition: se3_flash.c:263
Continuation of previous node.
Definition: se3_flash.h:130
bool se3_flash_init()
Initialize flash.
Definition: se3_flash.c:195
Invalid node.
Definition: se3_flash.h:128
Device's serial number.
Definition: se3_flash.h:129
bool se3_flash_it_next(se3_flash_it *it)
Increment flash iterator.
Definition: se3_flash.c:268
void se3_flash_info_setup(uint32_t sector, const uint8_t *base)
Initialize flash structures.
Definition: se3_flash.c:179
bool se3_flash_canfit(size_t size)
Check if enough space for new node.
Definition: se3_flash.c:189