15 #ifndef KERNEL_BLOCKSTORE_H_
16 #define KERNEL_BLOCKSTORE_H_
34 #define E_BS_INVALID (E_BLOCK + 0x01)
35 #define E_BS_INVALID_DESCR "Can not load blockdata, invalid"
38 #define E_BS_LEN_MISMATCH (E_BLOCK + 0x02)
39 #define E_BS_LEN_MISMATCH_DESCR "Length of block not equal to provided buffer"
55 bool bsSave(
unsigned int block,
void * data,
size_t len);
67 bool bsLoad(
unsigned int block,
void * data,
size_t len);
79 bool bsCheck(
unsigned int block,
size_t len,
bool * hasValidData);
89 bool bsErase(
unsigned int block);
bool bsCheck(unsigned int block, size_t len, bool *hasValidData)
Checks the contents of a block.
bool bsLoad(unsigned int block, void *data, size_t len)
Loads a block of data from the flash.
Manages the global system error.
bool bsSave(unsigned int block, void *data, size_t len)
Saves a block of data on the internal flash.
bool bsErase(unsigned int block)
Erases all data.
This module is responsible for distributing error codes.