Backend reading a raw flash region.
More...
|
| bool | gb_storage_flash_setup (GetBytesStorage *storage, GetBytesObjectType object_type, GetBytesStorageInfo *info) |
| | Set up the storage, see gb_storage_setup().
|
| |
| GetBytesInfoErrorCode | gb_storage_flash_get_size (GetBytesStorage *storage, uint32_t *size) |
| | Get the object size, see gb_storage_get_size().
|
| |
| bool | gb_storage_flash_read_next_chunk (GetBytesStorage *storage, uint8_t *buffer, uint32_t len) |
| | Read the next chunk, see gb_storage_read_next_chunk().
|
| |
| void | gb_storage_flash_cleanup (GetBytesStorage *storage, bool successful) |
| | Release the storage, see gb_storage_cleanup().
|
| |
Backend reading a raw flash region.
◆ gb_storage_flash_cleanup()
| void gb_storage_flash_cleanup |
( |
GetBytesStorage * |
storage, |
|
|
bool |
successful |
|
) |
| |
Release the storage, see gb_storage_cleanup().
Frees the backend state.
- Parameters
-
| storage | Storage. |
| successful | The whole object was sent. |
◆ gb_storage_flash_get_size()
◆ gb_storage_flash_read_next_chunk()
| bool gb_storage_flash_read_next_chunk |
( |
GetBytesStorage * |
storage, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
len |
|
) |
| |
Read the next chunk, see gb_storage_read_next_chunk().
- Parameters
-
| storage | Storage. |
| [out] | buffer | Destination. |
| len | Number of bytes to read. |
- Returns
- true on success.
◆ gb_storage_flash_setup()
Set up the storage, see gb_storage_setup().
Fails if the region is empty or exceeds the flash size.
- Parameters
-
| [out] | storage | Storage. |
| object_type | Object type. |
| info | Request parameters. |
- Returns
- true on success.