Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "test_env.h" 00003 00004 int main(void) 00005 { 00006 MBED_HOSTTEST_TIMEOUT(15); 00007 MBED_HOSTTEST_SELECT(wfi_auto); 00008 MBED_HOSTTEST_DESCRIPTION(WFI correct behavior); 00009 MBED_HOSTTEST_START("MBED_36"); 00010 #if defined TARGET_STM32F4 00011 TIM_HandleTypeDef TimMasterHandle; 00012 TimMasterHandle.Instance = TIM5; 00013 __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2); 00014 #endif 00015 int count = 0; 00016 while(1) { 00017 printf("%d\r\n", count++); 00018 __WFI(); 00019 } 00020 }
Generated on Sun Jul 17 2022 08:25:26 by 1.7.2