Microchip® Advanced Software Framework

gui.h File Reference
#include "com_task.h"

Enumerations

View to update
enum  gui_update_view {
  GUI_UPDATE_VIEW_NONE,
  GUI_UPDATE_VIEW_IDLE,
  GUI_UPDATE_VIEW_IDLE_TRANSITION,
  GUI_UPDATE_VIEW_NAVIGATION,
  GUI_UPDATE_VIEW_NAVIGATION_TRANSITION,
  GUI_UPDATE_VIEW_PLAYBACK,
  GUI_UPDATE_VIEW_PLAYBACK_TRANSITION,
  GUI_UPDATE_VIEW_CONFIG,
  GUI_UPDATE_VIEW_CONFIG_TRANSITION
}
 
Elements of the view to update
enum  gui_update_elt {
  GUI_UPDATE_ELT_NONE = 0x00000000,
  GUI_UPDATE_ELT_IN_PROGRESS = 0x80000000,
  GUI_UPDATE_ELT_CONNECTED = 0x40000000,
  GUI_UPDATE_ELT_DISCONNECTED = 0x20000000,
  GUI_UPDATE_ELT_IDLE_NOT_SUPPORTED = 0x00000001,
  GUI_UPDATE_ELT_IDLE_DEVICE_PRESENT = 0x00000002,
  GUI_UPDATE_ELT_IDLE_NO_DEVICE_PRESENT = 0x00000004,
  GUI_UPDATE_ELT_NAVIGATION_FILE_LIST = 0x00000001,
  GUI_UPDATE_ELT_NAVIGATION_CURSOR = 0x00000002,
  GUI_UPDATE_ELT_NAVIGATION_NO_FILES = 0x00000004,
  GUI_UPDATE_ELT_PLAYBACK_PLAY = 0x00000001,
  GUI_UPDATE_ELT_PLAYBACK_PAUSE = 0x00000002,
  GUI_UPDATE_ELT_PLAYBACK_STOP = 0x00000004,
  GUI_UPDATE_ELT_PLAYBACK_FFW = 0x00000008,
  GUI_UPDATE_ELT_PLAYBACK_FRW = 0x00000010,
  GUI_UPDATE_ELT_PLAYBACK_ELAPSED_TIME = 0x00000020,
  GUI_UPDATE_ELT_PLAYBACK_VOLUME = 0x00000040,
  GUI_UPDATE_ELT_PLAYBACK_ARTIST = 0x00000080,
  GUI_UPDATE_ELT_PLAYBACK_TITLE = 0x00000100,
  GUI_UPDATE_ELT_PLAYBACK_TOTAL_TIME = 0x00000200,
  GUI_UPDATE_ELT_PLAYBACK_COVER_ART = 0x00000400,
  GUI_UPDATE_ELT_PLAYBACK_FILE_NAME = 0x00000800,
  GUI_UPDATE_ELT_APPLE_LOGO = 0x00001000,
  GUI_UPDATE_ELT_CONFIG_REPEAT = 0x00000001,
  GUI_UPDATE_ELT_CONFIG_SHUFFLE = 0x00000002,
  GUI_UPDATE_ELT_CONFIG_CURSOR = 0x00000004
}
 

Functions

void gui_enter_idle (void)
 Make the display darker in order to simulate an idle mode and reduce power consumption. More...
 
void gui_init (uint32_t fcpu_hz, uint32_t fhsb_hz, uint32_t fpbb_hz, uint32_t fpba_hz)
 Initialization function of the GUI interface. More...
 
void gui_leave_idle (void)
 Restore the display in the running mode. More...
 
void gui_shutdown (void)
 Shutdown the GUI. More...
 
void gui_update (enum gui_update_view view, enum gui_update_elt *element, struct display_file_list *lst_str, struct file_info *info, struct player_info *player)
 GUI main task update. More...
 

Enumerator
GUI_UPDATE_ELT_NONE 

No element selected.

GUI_UPDATE_ELT_IN_PROGRESS 

In progress element.

GUI_UPDATE_ELT_CONNECTED 

Device connected, mounted and ready to operate.

GUI_UPDATE_ELT_DISCONNECTED 

Device disconnected.

GUI_UPDATE_ELT_IDLE_NOT_SUPPORTED 

Device not supported message in the idle view.

GUI_UPDATE_ELT_IDLE_DEVICE_PRESENT 

Device present message in the idle view.

GUI_UPDATE_ELT_IDLE_NO_DEVICE_PRESENT 

No device present message in the idle view.

GUI_UPDATE_ELT_NAVIGATION_FILE_LIST 

File list update in the navigation view.

GUI_UPDATE_ELT_NAVIGATION_CURSOR 

Cursor display in the navigation view.

GUI_UPDATE_ELT_NAVIGATION_NO_FILES 

Raised when a directory with no files/folders is opened.

GUI_UPDATE_ELT_PLAYBACK_PLAY 

Play key display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_PAUSE 

Pause key display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_STOP 

Stop key display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_FFW 

Fast forward key display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_FRW 

Fast rewind key display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_ELAPSED_TIME 

Elapsed time display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_VOLUME 

Volume bar display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_ARTIST 

Artist name display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_TITLE 

Track title display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_TOTAL_TIME 

Total time display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_COVER_ART 

Cover art display in the playback view.

GUI_UPDATE_ELT_PLAYBACK_FILE_NAME 

Current song file name display in the playback view.

GUI_UPDATE_ELT_APPLE_LOGO 

Apple Logo (in case on Local UI mode)

GUI_UPDATE_ELT_CONFIG_REPEAT 

Repeat option display in the configuration view.

GUI_UPDATE_ELT_CONFIG_SHUFFLE 

Shuffle option display in the configuration view.

GUI_UPDATE_ELT_CONFIG_CURSOR 

Cursor display in the configuration view.

Enumerator
GUI_UPDATE_VIEW_NONE 

No view selected.

GUI_UPDATE_VIEW_IDLE 

Idle view.

GUI_UPDATE_VIEW_IDLE_TRANSITION 

Transition to the idle view.

GUI_UPDATE_VIEW_NAVIGATION 

Navigation view.

GUI_UPDATE_VIEW_NAVIGATION_TRANSITION 

Transition to the navigation view.

GUI_UPDATE_VIEW_PLAYBACK 

Playback view.

GUI_UPDATE_VIEW_PLAYBACK_TRANSITION 

Transition to the playback view.

GUI_UPDATE_VIEW_CONFIG 

Configuration view.

GUI_UPDATE_VIEW_CONFIG_TRANSITION 

Transition to the configuration view.

void gui_enter_idle ( void  )

Make the display darker in order to simulate an idle mode and reduce power consumption.

References et024006_enter_idle().

void gui_init ( uint32_t  fcpu_hz,
uint32_t  fhsb_hz,
uint32_t  fpbb_hz,
uint32_t  fpba_hz 
)

Initialization function of the GUI interface.

Parameters
fcpu_hzCPU frequency.
fhsb_hzHSB frequency.
fpbb_hzPBB frequency.
fpba_hzPBA frequency.

References BLACK, draw_startup(), et024006_DrawFilledRect(), ET024006_HEIGHT, et024006_Init(), ET024006_WIDTH, ET024006DHU_BL_PIN, gpio_set_gpio_pin(), and load_sdram_data().

Referenced by com_task_init().

void gui_leave_idle ( void  )

Restore the display in the running mode.

References et024006_leave_idle().

void gui_shutdown ( void  )

Shutdown the GUI.

void gui_update ( enum gui_update_view  view,
enum gui_update_elt element,
struct display_file_list lst_str,
struct file_info info,
struct player_info player 
)

GUI main task update.

Parameters
viewThe view to update.
elementThe elements of the view to be update.
lst_strThe list of file in the current directory.
infoInformation of the selected file.
playerInformation about the player itself.

References call_draw_fct, clear_in_progress(), draw_config(), draw_config_view_print_cursor(), draw_config_view_print_repeat(), draw_config_view_print_shuffle(), draw_cover_art(), draw_cursor(), draw_device_not_present(), draw_device_not_supported(), draw_device_present(), draw_file_list(), draw_in_progress(), draw_navigation(), draw_no_file(), draw_pause_button(), draw_play_button(), draw_play_view(), draw_play_view_print_artist(), draw_play_view_print_file(), draw_play_view_print_title(), draw_play_view_print_total_time(), draw_playtime_update(), draw_startup(), draw_transition(), draw_volume_bar(), GUI_UPDATE_ELT_CONFIG_CURSOR, GUI_UPDATE_ELT_CONFIG_REPEAT, GUI_UPDATE_ELT_CONFIG_SHUFFLE, GUI_UPDATE_ELT_IDLE_DEVICE_PRESENT, GUI_UPDATE_ELT_IDLE_NO_DEVICE_PRESENT, GUI_UPDATE_ELT_IDLE_NOT_SUPPORTED, GUI_UPDATE_ELT_IN_PROGRESS, GUI_UPDATE_ELT_NAVIGATION_CURSOR, GUI_UPDATE_ELT_NAVIGATION_FILE_LIST, GUI_UPDATE_ELT_NAVIGATION_NO_FILES, GUI_UPDATE_ELT_PLAYBACK_ARTIST, GUI_UPDATE_ELT_PLAYBACK_COVER_ART, GUI_UPDATE_ELT_PLAYBACK_ELAPSED_TIME, GUI_UPDATE_ELT_PLAYBACK_FILE_NAME, GUI_UPDATE_ELT_PLAYBACK_PAUSE, GUI_UPDATE_ELT_PLAYBACK_PLAY, GUI_UPDATE_ELT_PLAYBACK_TITLE, GUI_UPDATE_ELT_PLAYBACK_TOTAL_TIME, GUI_UPDATE_ELT_PLAYBACK_VOLUME, GUI_UPDATE_VIEW_CONFIG, GUI_UPDATE_VIEW_CONFIG_TRANSITION, GUI_UPDATE_VIEW_IDLE, GUI_UPDATE_VIEW_IDLE_TRANSITION, GUI_UPDATE_VIEW_NAVIGATION, GUI_UPDATE_VIEW_NAVIGATION_TRANSITION, GUI_UPDATE_VIEW_NONE, GUI_UPDATE_VIEW_PLAYBACK, GUI_UPDATE_VIEW_PLAYBACK_TRANSITION, TRANSITION_FROM_LEFT_TO_RIGHT, and TRANSITION_FROM_RIGHT_TO_LEFT.

Referenced by com_task().