X hits on this document

PDF document

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





20 / 29




The controller is the module that makes the link between the driver and the abstraction layer used to ensure compatibility with the communication task. It is based on mainly two API groups: ‘setup’ and ‘events’. All the APIs are defined in the file /APPLICATIONS/AUDIO- PLAYER/USER_INTERFACE/CONTROLLER/controller.h.

The function controller_init is used to initialize the controller. It may be used or not, depending on the controller implementation.

All the other functions are boolean functions, returning true if an event has been raised or false otherwise. Their name is explicit and follows the following naming convention:

Bool controller_<view>_<event>(void);

Where <view> corresponds to the current view when the event should be taken into account. If no value is set to this field, the event is applied to all views.

The <event> is a short name describing the current event for which the function applies to. This example uses a joystick controller. The source code relative to this module is available in




P L A Y E R / U S E R _ I N T E R F A C E / C O N T R O L L E R / j o y s t i c k _ c o n t r o l l e r . c .

Graphical User Interface This module is used to display to the user the high level audio player data. It acts as a display and when combined with the controller it provides to the user a full control of the application.

This module is similar to the controller in terms of API groups.

The initialization function is called gui_init and takes into parameters all useful frequencies that can be used to initialize the display.

The ‘event’ group (to keep the same architecture as the controller), is composed of only one function: gui_update. This function is called at every occurrence of the main loop and takes into parameters flags, describing which part of the view have to be updated. The resetting of these flag is let to the GUI module so that is can achieve the update of the display asynchronously and does not have to update every component at once.

The example provides a graphical LCD display module that implements both a navigation and a p l a y b a c k v i e w . A l l t h e c o d e i s b a s e d o n t h e f i le s / A P P L I C A T I O N S / A U D I O - PLAYER/USER_INTERFACE/GUI/[et024006dhu_gui.c|sdram_loader.c].

AT32UC3A Drivers The firmware uses the AVR32 UC3 driver library available in

The source code can be found into /DRIVERS.


The USB low level driver is located in:

The USB mass storage service is located in:



Document info
Document views54
Page views54
Page last viewedSun Oct 23 06:14:14 UTC 2016