lab stugg
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem 4180_Lab3_rtos_basic
main.cpp
- Committer:
- ldeng31
- Date:
- 2015-10-01
- Revision:
- 7:49bfd42cbf6f
- Parent:
- 3:c92e21f305d8
- Child:
- 8:8eb653dc6571
File content as of revision 7:49bfd42cbf6f:
#include "mbed.h" #include "rtos.h" PwmOut Speaker(p26); PwmOut RGBLED_r(p23); PwmOut RGBLED_g(p22); PwmOut RGBLED_b(p21); void ulcd1_thread(void const *args) { while (true) { } } 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(ulcd1_thread); Thread thraed(ulcd2_thread); Thread thread(led_thread); Thread thread(Speaker_thread); while (true) { Thread::wait(500); } }