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: libraries/tests/mbed/reset/main.cpp
- Revision:
- 0:6c56fb4bc5f0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libraries/tests/mbed/reset/main.cpp Fri Nov 04 20:27:58 2016 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +#if !DEVICE_SEMIHOST + #error [NOT_SUPPORTED] Semihost not supported +#endif + +Serial pc(USBTX, USBRX); + +extern "C" void mbed_reset(); + +int main() { + pc.printf("start\n"); + wait(1); + + unsigned int counter = 0; + while(1) { + pc.printf("%u\n",counter++); + wait(1); + mbed_reset(); + } +}