mbed-os
Fork of mbed-os by
features/unsupported/tests/mbed/wfi/main.cpp@0:f269e3021894, 2016-10-23 (annotated)
- Committer:
- elessair
- Date:
- Sun Oct 23 15:10:02 2016 +0000
- Revision:
- 0:f269e3021894
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
elessair | 0:f269e3021894 | 1 | #include "mbed.h" |
elessair | 0:f269e3021894 | 2 | #include "test_env.h" |
elessair | 0:f269e3021894 | 3 | |
elessair | 0:f269e3021894 | 4 | int main(void) |
elessair | 0:f269e3021894 | 5 | { |
elessair | 0:f269e3021894 | 6 | MBED_HOSTTEST_TIMEOUT(15); |
elessair | 0:f269e3021894 | 7 | MBED_HOSTTEST_SELECT(wfi_auto); |
elessair | 0:f269e3021894 | 8 | MBED_HOSTTEST_DESCRIPTION(WFI correct behavior); |
elessair | 0:f269e3021894 | 9 | MBED_HOSTTEST_START("MBED_36"); |
elessair | 0:f269e3021894 | 10 | #if defined TARGET_STM32F4 |
elessair | 0:f269e3021894 | 11 | TIM_HandleTypeDef TimMasterHandle; |
elessair | 0:f269e3021894 | 12 | TimMasterHandle.Instance = TIM5; |
elessair | 0:f269e3021894 | 13 | __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2); |
elessair | 0:f269e3021894 | 14 | #endif |
elessair | 0:f269e3021894 | 15 | int count = 0; |
elessair | 0:f269e3021894 | 16 | while(1) { |
elessair | 0:f269e3021894 | 17 | printf("%d\r\n", count++); |
elessair | 0:f269e3021894 | 18 | __WFI(); |
elessair | 0:f269e3021894 | 19 | } |
elessair | 0:f269e3021894 | 20 | } |