mbed-os
Fork of mbed-os by
Diff: features/unsupported/tests/mbed/reset/main.cpp
- Revision:
- 0:f269e3021894
diff -r 000000000000 -r f269e3021894 features/unsupported/tests/mbed/reset/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/features/unsupported/tests/mbed/reset/main.cpp Sun Oct 23 15:10:02 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(); + } +}