SEU_G10
/
rtos_3
rtos3
Fork of rtos_3 by
main.cpp
- Committer:
- xiscosc
- Date:
- 2015-11-13
- Revision:
- 7:446175f23903
- Parent:
- 3:c92e21f305d8
File content as of revision 7:446175f23903:
#include "mbed.h" #include "rtos.h" DigitalOut led1(LED1); DigitalOut led2(LED2); double status; Timer t; bool b; void thread1(void const *args) { t.stop(); printf("The time taken was %d US_SECONDS (CON DIFERENTES PRIORIDADES) \r\n", t.read_us()); t.reset(); while (true) { } } int main() { led1 = false; led2 = false; b = true; Thread my_thread1(thread1, NULL, osPriorityLow); while (true) { t.start(); Thread::wait(300); } }