Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:2dfd987fe78d
- Child:
- 1:1b008c088fcc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Feb 28 03:11:10 2017 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "stm32f4xx_flash.h" +#include "BREMSFlash.h" + +Serial pc(USBTX, USBRX); +int x; + +int main() { + pc.baud(921600); + pc.printf("%s\n", "The program is running"); + + FlashWriter writer(4); + writer.write(0, (int) -38); + writer.write(1, (uint32_t) 1234); + writer.write(2, 4.14159f); + writer.close(); + + for(;;) { + pc.printf("%d %d %f\n", flashReadInt(4, 0), flashReadUint(4, 1), flashReadFloat(4, 2)); + wait(1); + } +}