]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/tests/mbed/stdio/main.cpp
4 /* This test purpose is to verify the behaviour when the program does not link
5 * any symbol from the mbed library.
6 * In the past we had an issue where the stdio retargeting was not linked in.
10 MBED_HOSTTEST_TIMEOUT(20);
11 MBED_HOSTTEST_SELECT(stdio_auto
);
12 MBED_HOSTTEST_DESCRIPTION(stdio
);
13 MBED_HOSTTEST_START("MBED_2");
15 DigitalOut
led1(LED1
);
16 DigitalOut
led2(LED2
);
21 notify_start(); // Just to sync with host test supervisor
23 const char* PRINT_PATTERN
= "MBED: Your value was: %d\r\n";
26 // SCANF PRINTF family
29 scanf("%d", &value_int
);
30 printf(PRINT_PATTERN
, value_int
);
33 // FSCANF, FPRINTF family
36 fscanf(stdin
, "%d", &value_int
);
37 fprintf(stdout
, PRINT_PATTERN
, value_int
);