mbed rtos Thread usage samples

Import programRTOS-VS1053b-mp3_v01

My first attempt of Thread based mp3 player with mbed RTOS *player thread *volume control thread

My first attempt of Thread based mp3 player with mbed RTOS, two threads

  • player thread
  • volume control thread

Originally from Christian Schmiljun's program and library for VS1053. http://mbed.org/users/christi_s/programs/Lib_VS1053b/lkxqn6/docs/main_8cpp_source.html http://mbed.org/users/christi_s/libraries/VS1053b/ll30y4

Changes

  • reduce mp3 buffer size 16k -> 8k
  • move some auto values to static to save stack size
  • change while(1)loop to Thread::wait(100)) for wait buffer
  • Add threads
    • player thread: extend stack size 2.25 of default
    • volume control thread with default arg

Import programRTOS-VS1053b-mp3_semaphore

mp3 play, wait and sync by semaphore *player thread *volume control thread

  • use Semaphore.get and release, instead of simple Thread::wait(100))


Please log in to post comments.