Kojo
/
RTOS-VS1053b-mp3_v01
My first attempt of Thread based mp3 player with mbed RTOS *player thread *volume control thread
main.cpp@1:4d5a54104bbb, 2012-03-19 (annotated)
- Committer:
- takashikojo
- Date:
- Mon Mar 19 12:00:14 2012 +0000
- Revision:
- 1:4d5a54104bbb
- Parent:
- 0:82078eeba8ba
Thread based mp3 player with mbed RTOS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takashikojo | 0:82078eeba8ba | 1 | #include "mbed.h" |
takashikojo | 0:82078eeba8ba | 2 | #include "rtos.h" |
takashikojo | 0:82078eeba8ba | 3 | |
takashikojo | 0:82078eeba8ba | 4 | extern void main_mp3(void const *) ; |
takashikojo | 0:82078eeba8ba | 5 | DigitalOut led1(LED1); |
takashikojo | 0:82078eeba8ba | 6 | |
takashikojo | 0:82078eeba8ba | 7 | int main() { |
takashikojo | 0:82078eeba8ba | 8 | |
takashikojo | 0:82078eeba8ba | 9 | Thread t(main_mp3 , NULL, osPriorityNormal, (DEFAULT_STACK_SIZE * 2.25)); |
takashikojo | 0:82078eeba8ba | 10 | |
takashikojo | 0:82078eeba8ba | 11 | while (true) { |
takashikojo | 0:82078eeba8ba | 12 | led1 = 1 ; |
takashikojo | 0:82078eeba8ba | 13 | Thread::wait(1000); |
takashikojo | 0:82078eeba8ba | 14 | led1 = 0 ; |
takashikojo | 0:82078eeba8ba | 15 | } |
takashikojo | 0:82078eeba8ba | 16 | } |