Torsten Wylegala
/
rtos-example
rtos example
Fork of mbed_blinky by
ThreadTestClass.cpp@8:ec1a44f8e456, 2016-02-04 (annotated)
- Committer:
- torstenwylegala
- Date:
- Thu Feb 04 10:43:16 2016 +0000
- Revision:
- 8:ec1a44f8e456
init
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
torstenwylegala | 8:ec1a44f8e456 | 1 | #include "ThreadTestClass.h" |
torstenwylegala | 8:ec1a44f8e456 | 2 | |
torstenwylegala | 8:ec1a44f8e456 | 3 | ThreadTestClass::ThreadTestClass(): led2(LED2){ |
torstenwylegala | 8:ec1a44f8e456 | 4 | |
torstenwylegala | 8:ec1a44f8e456 | 5 | led2 = true; |
torstenwylegala | 8:ec1a44f8e456 | 6 | |
torstenwylegala | 8:ec1a44f8e456 | 7 | } |
torstenwylegala | 8:ec1a44f8e456 | 8 | |
torstenwylegala | 8:ec1a44f8e456 | 9 | void ThreadTestClass::run(){ |
torstenwylegala | 8:ec1a44f8e456 | 10 | |
torstenwylegala | 8:ec1a44f8e456 | 11 | while(true){ |
torstenwylegala | 8:ec1a44f8e456 | 12 | |
torstenwylegala | 8:ec1a44f8e456 | 13 | led2 = !led2; |
torstenwylegala | 8:ec1a44f8e456 | 14 | |
torstenwylegala | 8:ec1a44f8e456 | 15 | Thread::wait(2000); |
torstenwylegala | 8:ec1a44f8e456 | 16 | } |
torstenwylegala | 8:ec1a44f8e456 | 17 | |
torstenwylegala | 8:ec1a44f8e456 | 18 | } |