====== Design ====== * Start general * Add more detail as you understand the problem * Let it unfold Design Objectives ================= * Small clearly focused components * Think of it as a bucket brigade * Synchronize action with semphores * Protect changes to data with semphores, mailboxes, queues * Watch out for priority inversion. Use Mutexes where necessary. Design Patterns =============== * Worker tasks for interrupt handling * Do the interrupt handling work in a task not in the interrupt routine * Have a task waiting on a semphore * Have the interrupt routine signal the semphore Top Down Diagram ================ .. image:: Top_Down_Design_of_Music_Player.png :width: 650 Possible Design =============== .. image:: Music_Player_Design.png :width: 600