summaryrefslogtreecommitdiff
path: root/tool/mbed/mbed-sdk/libraries/tests/mbed/reset/main.cpp
blob: b38218e70659cc1c2545b44084a62981c9402fd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "mbed.h"

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();
    }
}