lab stugg
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem 4180_Lab3_rtos_basic
Diff: main.cpp
- Revision:
- 7:49bfd42cbf6f
- Parent:
- 3:c92e21f305d8
- Child:
- 8:8eb653dc6571
--- a/main.cpp Tue Jun 04 16:01:32 2013 +0100 +++ b/main.cpp Thu Oct 01 19:02:10 2015 +0000 @@ -1,21 +1,44 @@ #include "mbed.h" #include "rtos.h" - -DigitalOut led1(LED1); -DigitalOut led2(LED2); + +PwmOut Speaker(p26); -void led2_thread(void const *args) { +PwmOut RGBLED_r(p23); +PwmOut RGBLED_g(p22); +PwmOut RGBLED_b(p21); + +void ulcd1_thread(void const *args) { while (true) { - led2 = !led2; + + } +} + +void ulcd2_thread(void const *args) { + while (true) { + + } +} + +void led_thread(void const *args) { + while (true) { + RGBLED_r = 1.0; Thread::wait(1000); } } + +void Speaker_thread(void const *args) { + while (true) { + + } +} int main() { - Thread thread(led2_thread); + Thread thread(ulcd1_thread); + Thread thraed(ulcd2_thread); + Thread thread(led_thread); + Thread thread(Speaker_thread); while (true) { - led1 = !led1; Thread::wait(500); } }