mbed_example
/
HeapBlockDevice_ex_1
Example for HeapBlockDevice use
Diff: main.cpp
- Revision:
- 0:acdc1ce79ab5
- Child:
- 1:fbc7acd77a77
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 10 20:55:11 2017 +0000 @@ -0,0 +1,13 @@ +#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"; + * + * int main() { + * bd.init(); + * bd.program(block, 0); + * bd.read(block, 0); + * printf("%s", block); + * bd.deinit(); + * } \ No newline at end of file