mbed-os
Fork of mbed-os by
Diff: features/unsupported/tests/mbed/wfi/main.cpp
- Revision:
- 0:f269e3021894
diff -r 000000000000 -r f269e3021894 features/unsupported/tests/mbed/wfi/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/features/unsupported/tests/mbed/wfi/main.cpp Sun Oct 23 15:10:02 2016 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" +#include "test_env.h" + +int main(void) +{ + MBED_HOSTTEST_TIMEOUT(15); + MBED_HOSTTEST_SELECT(wfi_auto); + MBED_HOSTTEST_DESCRIPTION(WFI correct behavior); + MBED_HOSTTEST_START("MBED_36"); +#if defined TARGET_STM32F4 + TIM_HandleTypeDef TimMasterHandle; + TimMasterHandle.Instance = TIM5; + __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2); +#endif + int count = 0; + while(1) { + printf("%d\r\n", count++); + __WFI(); + } +}