compartido
/
PR30_7
jeje
Revision 0:61e934827cac, committed 2017-11-09
- Comitter:
- JONEGU
- Date:
- Thu Nov 09 15:10:23 2017 +0000
- Commit message:
- Ejercicio7Practica3
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 09 15:10:23 2017 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" +#include "rtos.h" + + +DigitalOut Led1(PB_5); +DigitalOut Led2(PB_3); +DigitalOut Led3(PA_10); + + +void blink1( void constant*argument) +{ + while(1) + { + Led1= !Led1; + Thread: wait(1000); + } +} + +void blink2( void constant*argument) +{ + while(1) + { + Led2= !Led2; + Thread: wait(1200); + } +} + +void blink3( void constant*argument) +{ + while(1) + { + Led3= !Led3; + Thread: wait(1500); + } +} + +int main() +{ + Thread thread1(blink1, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); + Thread thread2(blink2, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); + Thread thread3(blink3, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); + while (true) +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Thu Nov 09 15:10:23 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 09 15:10:23 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e7ca05fa8600 \ No newline at end of file