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.
2 parents 410ef0c + 86fa677 commit 20d93bfCopy full SHA for 20d93bf
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.read(block, 0);
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