We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37b3b40 commit 86fa677Copy full SHA for 86fa677
features/filesystem/bd/HeapBlockDevice.h
@@ -34,13 +34,16 @@
34
* #include "mbed.h"
35
* #include "HeapBlockDevice.h"
36
*
37
- * HeapBlockDevice bd(2048, 512); // 2048 bytes with a block size of 512 bytes
38
- * uint8_t block[512] = "Hello World!\n";
+ * #define BLOCK_SIZE 512
+ *
39
+ * HeapBlockDevice bd(2048, BLOCK_SIZE); // 2048 bytes with a block size of 512 bytes
40
+ * uint8_t block[BLOCK_SIZE] = "Hello World!\n";
41
42
* int main() {
43
* bd.init();
- * bd.program(block, 0, bd.get_program_size());
- * bd.read(block, 0, bd.get_read_size());
44
+ * bd.erase(0, BLOCK_SIZE);
45
+ * bd.program(block, 0, BLOCK_SIZE);
46
+ * bd.read(block, 0, BLOCK_SIZE);
47
* printf("%s", block);
48
* bd.deinit();
49
* }
0 commit comments