Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of rtos_basic by
main.cpp
00001 #include "mbed.h" 00002 #include "rtos.h" 00003 00004 DigitalOut led1(P0_1); 00005 Serial pc(p19, p20); 00006 00007 void led1_thread(void const *args) { 00008 while (true) { 00009 led1 = !led1; 00010 Thread::wait(1000); 00011 } 00012 } 00013 00014 00015 int main() { 00016 00017 00018 pc.baud(115200); 00019 00020 NVIC_SetPriority(SSP1_IRQn, 0x0); 00021 NVIC_SetPriority(PIN_INT0_IRQn, 0x1); 00022 // SysTick set to lower priority than Wi-Fi SPI bus interrupt 00023 NVIC_SetPriority(SysTick_IRQn, 0x2); 00024 00025 Thread thread(led1_thread); 00026 00027 while (true) { 00028 00029 pc.printf("main Thread\r\n"); 00030 Thread::wait(500); 00031 } 00032 }
Generated on Mon Jul 18 2022 21:17:53 by
1.7.2
