#include <Storage.h>
Allocated block of memory on storage.
Definition at line 93 of file Storage.h.
Storage::Block::Block |
( |
Storage & |
mem, |
|
|
uint32_t |
size |
|
) |
| |
|
inline |
Construct block with given size on given storage device.
- Parameters
-
[in] | mem | storage device for block. |
[in] | size | number of bytes. |
Definition at line 100 of file Storage.h.
Storage::Block::~Block |
( |
| ) |
|
|
inline |
Destruct block and free allocated memory on storage device.
Definition at line 110 of file Storage.h.
uint32_t Storage::Block::addr |
( |
| ) |
|
|
inline |
Returns storage address for the memory block.
- Returns
- address.
Definition at line 119 of file Storage.h.
int Storage::Block::read |
( |
void * |
buf, |
|
|
uint32_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Read given number of bytes from offset within block to given buffer. Returns number of bytes read or negative error code.
- Parameters
-
[in] | buf | buffer pointer. |
[in] | offset | offset within block. |
[in] | size | number of bytes to read. |
- Returns
- number of bytes read or negative error code.
Definition at line 132 of file Storage.h.
int Storage::Block::write |
( |
uint32_t |
offset, |
|
|
const void * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Write given number of bytes from buffer to given offset within block. Returns number of bytes written or negative error code.
- Parameters
-
[in] | buf | buffer pointer. |
[in] | offset | offset within block. |
[in] | size | number of bytes to write. |
- Returns
- number of bytes written or negative error code.
Definition at line 148 of file Storage.h.
const uint32_t Storage::Block::m_addr |
|
protected |
Address on storage device.
Definition at line 163 of file Storage.h.
const uint32_t Storage::Block::SIZE |
Size of memory block.
Definition at line 156 of file Storage.h.
The documentation for this class was generated from the following file: