X hits on this document

PDF document

AVR32709: AVR32 UC3 Audio Decoder Over USB - page 3 / 29

100 views

0 shares

3 downloads

0 comments

3 / 29

AVR32709

4.3

Software architecture The following figure shows the basic software architecture of the application:

Figure 4-2.

Software architecture

main.c

USER INTERFACE/GUI/

_

usb task.c

com task.c

_

USER_INTERFACE/ CONTROLLER/

codec_xxx_task.c

h o s t _ m a s s _ s t o r a g e _ t a s k . c

_

audio interface.c

_

u s b _ h o s t _ t a s k . c

/SERVICES/AUDIO/MP3/

ai usb ms.c

_

_

/SERVICES/FAT/*.

DRIVERS

u s a r t . c s p i . c t w i . c s s c _ i 2 s . c f l a s h c . c p m . c g p i o . c

The application does not require any operating system to run. The main() function is in charge of calling the software «tasks» (using a scheduler) that make audio decoding, HMI, and USB man- agement possible. There are 5 tasks:

This task holds the real intelligence of the user application and interfaces directly with the Audio Interface. This is the task that the user should modify for his own application.

For example, if a new device using another class than the mass storage class is plugged, and of course if this class is supported by the application, then, this task will tell the audio interface to link the "Audio Interface" API to a low level API that supports this class. All the mechanism in place to dynamically link an API to this abstract API is located in the file: /SERVICES/AUDIO/AUDIO_PLAYER/audio_interface.[c|h] In this application, only the USB mass storage class is implemented, therefore, this function is not used.

involved will be the MP3 decoder, the USB stack and the host mass storage task:

  • The MP3 codec task: This task is in charge of the Audio Decoding management.

  • The USB task: This task handles the USB stack and events.

  • The Host Mass Storage task: This task will check for new devices connection and

initialize them using the USB Mass Storage class. The main loop of the application is a simple free-running task scheduler:

3

7817D–AVR32–05/11

Document info
Document views100
Page views100
Page last viewedSat Dec 10 19:14:22 UTC 2016
Pages29
Paragraphs1022
Words9236

Comments