Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions features/filesystem/bd/HeapBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@
* #include "mbed.h"
* #include "HeapBlockDevice.h"
*
* HeapBlockDevice bd(2048, 512); // 2048 bytes with a block size of 512 bytes
* uint8_t block[512] = "Hello World!\n";
* #define BLOCK_SIZE 512
*
* HeapBlockDevice bd(2048, BLOCK_SIZE); // 2048 bytes with a block size of 512 bytes
* uint8_t block[BLOCK_SIZE] = "Hello World!\n";
*
* int main() {
* bd.init();
* bd.program(block, 0);
* bd.read(block, 0);
* bd.erase(0, BLOCK_SIZE);
* bd.program(block, 0, BLOCK_SIZE);
* bd.read(block, 0, BLOCK_SIZE);
* printf("%s", block);
* bd.deinit();
* }
Expand Down