WORKS
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
main.cpp
00001 #include "mbed.h" 00002 #include "cmsis_os.h" 00003 00004 #if defined(MBED_RTOS_SINGLE_THREAD) 00005 #error [NOT_SUPPORTED] test not supported 00006 #endif 00007 00008 DigitalOut led1(LED1); 00009 DigitalOut led2(LED2); 00010 00011 void led2_thread(void const *argument) { 00012 while (true) { 00013 led2 = !led2; 00014 osDelay(1000); 00015 } 00016 } 00017 osThreadDef(led2_thread, osPriorityNormal, DEFAULT_STACK_SIZE); 00018 00019 int main() { 00020 osThreadCreate(osThread(led2_thread), NULL); 00021 00022 while (true) { 00023 led1 = !led1; 00024 osDelay(500); 00025 } 00026 }
Generated on Tue Jul 12 2022 12:28:41 by
1.7.2
