43 #ifndef BLOCK_MAX_CAPACITY 44 #define BLOCK_MAX_CAPACITY 4u 53 #ifndef BLOCK_CONTEXT_SIZE 54 #define BLOCK_CONTEXT_SIZE 32u 60 typedef struct hw_block_t hw_block_t;
101 bool hw_block_read(
const hw_block_t *block,
size_t index,
void *dst);
122 bool hw_block_write(hw_block_t *block,
size_t index,
const void *src);
bool hw_block_erase(hw_block_t *block, size_t index)
Erase one block.
size_t hw_block_count(const hw_block_t *block)
Return the number of addressable blocks.
size_t hw_block_size(const hw_block_t *block)
Return the block size in bytes.
void hw_block_deinit(hw_block_t *block)
Deinitialize a block handle.
bool hw_block_read(const hw_block_t *block, size_t index, void *dst)
Read one block into dst.
bool hw_block_write(hw_block_t *block, size_t index, const void *src)
Write one block from src.