Graphical User Interface.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include "gui.h"
#include "gpio.h"
#include "et024006dhu.h"
#include "sdram_loader.h"
#include "audio_mixer.h"
#include "conf_version.h"
#include "file.h"
Enumerations | |
enum | transition_t { TRANSITION_FROM_LEFT_TO_RIGHT, TRANSITION_FROM_RIGHT_TO_LEFT } |
Functions | |
static bool | clear_in_progress (enum gui_update_view view) |
static void | draw_background (int image_id, int offset_x, int offset_y) |
static bool | draw_config (int offset_x, int offset_y) |
static bool | draw_config_view_print_cursor (struct display_file_list *lst_str) |
static bool | draw_config_view_print_repeat (struct player_info *player) |
static bool | draw_config_view_print_shuffle (struct player_info *player) |
static bool | draw_cover_art (struct file_info *current_file_info) |
static bool | draw_cursor (struct display_file_list *lst_str) |
static bool | draw_device_not_present (void) |
static bool | draw_device_not_supported (void) |
static bool | draw_device_present (void) |
static void | draw_device_type (void) |
static bool | draw_file_list (struct display_file_list *lst_str) |
Draws the file list on the disk navigation view. More... | |
static bool | draw_in_progress (enum gui_update_view view) |
static bool | draw_navigation (int offset_x, int offset_y) |
Draws the navigation on the screen. More... | |
static bool | draw_no_file (struct display_file_list *lst_str) |
static bool | draw_pause_button (void) |
static bool | draw_play_button (void) |
static bool | draw_play_view (int offset_x, int offset_y) |
Draw the play view. Draws all elements in the play view. More... | |
static bool | draw_play_view_print_artist (struct file_info *current_file_info) |
static bool | draw_play_view_print_file (struct file_info *current_file_info) |
static bool | draw_play_view_print_title (struct file_info *current_file_info) |
static bool | draw_play_view_print_total_time (struct file_info *current_file_info) |
static bool | draw_playtime_update (struct file_info *current_file_info) |
Draws the elements that need periodic update in the play view. More... | |
static bool | draw_song_progress_bar (struct file_info *current_file_info) |
Draws the song progress bar on the screen. More... | |
static bool | draw_startup (int offset_x, int offset_y) |
Draw the startup image on the display. More... | |
static bool | draw_transition (bool(*view_start)(int, int), bool(*view_end)(int, int), enum transition_t transition) |
static bool | draw_volume_bar (struct file_info *current_file_info) |
Draws the volume bar on the playing view. More... | |
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 () |
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... | |
#define APPLI_BG_COLOR -1 |
Default background color.
Referenced by draw_config(), draw_config_view_print_cursor(), draw_config_view_print_repeat(), draw_config_view_print_shuffle(), draw_cursor(), draw_device_type(), draw_file_list(), draw_navigation(), draw_no_file(), draw_pause_button(), draw_play_view_print_artist(), draw_play_view_print_file(), draw_play_view_print_title(), draw_play_view_print_total_time(), draw_playtime_update(), and draw_startup().
#define APPLI_FG_COLOR WHITE |
Default foreground color.
Referenced by draw_config_view_print_cursor(), draw_config_view_print_repeat(), draw_config_view_print_shuffle(), draw_cursor(), draw_file_list(), draw_play_view_print_artist(), draw_play_view_print_file(), draw_play_view_print_title(), draw_play_view_print_total_time(), and draw_playtime_update().
#define ARTIST_CHARS_MAX 26 |
Referenced by draw_play_view_print_artist().
#define ARTIST_CHARS_MAX STR_MAX_LENGTH |
#define ARTIST_FONT FONT8x16 |
Referenced by draw_play_view_print_artist().
#define ARTIST_HEIGHT 16 |
Referenced by draw_play_view_print_artist().
#define ARTIST_POS_X 110 |
Referenced by draw_play_view_print_artist().
#define ARTIST_POS_Y 60 |
Referenced by draw_play_view_print_artist().
#define ARTIST_WIDTH (ET024006_WIDTH-ARTIST_POS_X) |
Referenced by draw_play_view_print_artist().
#define call_draw_fct | ( | elt, | |
elt_id, | |||
fct_call, | |||
... | |||
) |
Referenced by gui_update().
#define COVER_HEIGHT 100 |
Referenced by draw_cover_art().
#define COVER_POS_X 5 |
Referenced by draw_cover_art().
#define COVER_POS_Y 60 |
Referenced by draw_cover_art().
#define COVER_WIDTH 100 |
Referenced by draw_cover_art().
#define CURSOR_FONT FONT8x8 |
Referenced by draw_config_view_print_cursor().
#define CURSOR_FONT_HEIGHT 8 |
#define CURSOR_FONT_WIDTH 8 |
Referenced by draw_config_view_print_cursor().
#define CURSOR_POS_X 60 |
Referenced by draw_config_view_print_cursor().
#define CURSOR_RANGE_HEIGHT (SHUFFLE_POS_Y + CURSOR_FONT_HEIGHT - REPEAT_POS_Y) |
Referenced by draw_config_view_print_cursor().
#define ELAPSED_TIME_HEIGHT 10 |
Referenced by draw_playtime_update().
#define ELAPSED_TIME_POS_X 5 |
Referenced by draw_playtime_update().
#define ELAPSED_TIME_POS_Y 200 |
Referenced by draw_playtime_update().
#define ELAPSED_TIME_WIDTH 64 |
Referenced by draw_playtime_update().
#define FILE_LIST_FONT FONT8x8 |
Referenced by draw_cursor(), draw_file_list(), and draw_no_file().
#define FILE_LIST_HEIGHT 180 |
#define FILE_LIST_ITEM_HEIGHT 8 |
Referenced by draw_file_list().
#define FILE_LIST_ITEM_WIDTH 8 |
#define FILE_LIST_ITEM_X 12 |
Referenced by draw_file_list(), and draw_no_file().
#define FILE_LIST_POS_X 60 |
Referenced by draw_cursor(), draw_file_list(), and draw_no_file().
#define FILE_LIST_POS_Y 60 |
Referenced by draw_cursor(), draw_file_list(), and draw_no_file().
#define FILE_LIST_SPACING 15 |
Referenced by draw_file_list().
#define FILE_LIST_WIDTH 260 |
Referenced by draw_file_list().
#define FILE_NAME_FONT FONT8x8 |
Referenced by draw_play_view_print_file().
#define FILE_NAME_HEIGHT 8 |
Referenced by draw_play_view_print_file().
#define FILE_NAME_POS_X 110 |
Referenced by draw_play_view_print_file().
#define FILE_NAME_POS_Y 90 |
Referenced by draw_play_view_print_file().
#define FILE_NAME_WIDTH (ET024006_WIDTH-ARTIST_POS_X) |
Referenced by draw_play_view_print_file().
#define IN_PROGRESS_SPRITE_HEIGHT 16 |
Referenced by clear_in_progress(), and draw_in_progress().
#define IN_PROGRESS_SPRITE_NB 8 |
Referenced by draw_in_progress().
#define IN_PROGRESS_SPRITE_WIDTH 16 |
Referenced by clear_in_progress(), and draw_in_progress().
#define MAX_PATH 256 |
#define NAME_CHARS_MAX 26 |
Referenced by draw_play_view_print_file().
#define NAME_CHARS_MAX STR_MAX_LENGTH |
#define PAUSE_BUTTON_COLOR 0xFD60 |
Referenced by draw_pause_button(), and draw_play_button().
#define PAUSE_BUTTON_HEIGHT 12 |
Referenced by draw_pause_button(), and draw_play_button().
#define PAUSE_BUTTON_PART_WIDTH 3 |
Referenced by draw_pause_button().
#define PAUSE_BUTTON_POS_X 35 |
Referenced by draw_pause_button(), and draw_play_button().
#define PAUSE_BUTTON_POS_Y 217 |
Referenced by draw_pause_button(), and draw_play_button().
#define PAUSE_BUTTON_SPACING 1 |
Referenced by draw_pause_button().
#define PAUSE_BUTTON_WIDTH 10 |
Referenced by draw_play_button().
#define PLAY_BUTTON_HEIGHT 15 |
Referenced by draw_pause_button().
#define PLAY_BUTTON_POS_X 19 |
Referenced by draw_pause_button(), and draw_play_button().
#define PLAY_BUTTON_POS_Y 215 |
Referenced by draw_pause_button(), and draw_play_button().
#define PLAY_BUTTON_WIDTH 10 |
Referenced by draw_pause_button().
#define REPEAT_FONT FONT8x8 |
Referenced by draw_config_view_print_repeat().
#define REPEAT_FONT_HEIGHT 8 |
Referenced by draw_config_view_print_repeat(), and draw_config_view_print_shuffle().
#define REPEAT_FONT_WIDTH 8 |
Referenced by draw_config_view_print_repeat().
#define REPEAT_MESSAGE_HEIGHT (4*REPEAT_FONT_HEIGHT) |
Referenced by draw_config_view_print_repeat().
#define REPEAT_MESSAGE_WIDTH 260 |
#define REPEAT_POS_X 72 |
Referenced by draw_config_view_print_repeat().
#define REPEAT_POS_Y 60 |
Referenced by draw_config_view_print_cursor(), and draw_config_view_print_repeat().
#define SHUFFLE_FONT FONT8x8 |
Referenced by draw_config_view_print_shuffle().
#define SHUFFLE_FONT_HEIGHT 8 |
Referenced by draw_config_view_print_shuffle().
#define SHUFFLE_FONT_WIDTH 8 |
Referenced by draw_config_view_print_shuffle().
#define SHUFFLE_MESSAGE_HEIGHT (3*SHUFFLE_FONT_HEIGHT) |
Referenced by draw_config_view_print_shuffle().
#define SHUFFLE_MESSAGE_WIDTH 260 |
#define SHUFFLE_POS_X 72 |
Referenced by draw_config_view_print_shuffle().
#define SHUFFLE_POS_Y 100 |
Referenced by draw_config_view_print_cursor(), and draw_config_view_print_shuffle().
#define SONG_BAR_FILL_COLOR 0xFD60 |
Referenced by draw_song_progress_bar().
#define SONG_BAR_HEIGHT 4 |
Referenced by draw_song_progress_bar().
#define SONG_BAR_POS_X 23 |
Referenced by draw_song_progress_bar().
#define SONG_BAR_POS_Y 181 |
Referenced by draw_song_progress_bar().
#define SONG_BAR_WIDTH 280 |
Referenced by draw_song_progress_bar().
#define STARTUP_MESSAGE_HEIGHT 29 |
Referenced by draw_device_not_present(), draw_device_not_supported(), and draw_device_present().
#define STARTUP_MESSAGE_LOADING_WIDTH 100 |
Referenced by draw_device_present().
#define STARTUP_MESSAGE_NOT_SUPPORTED_WIDTH 176 |
Referenced by draw_device_not_supported().
#define STARTUP_MESSAGE_WIDTH (ET024006_WIDTH-STARTUP_MESSAGE_X) |
Referenced by draw_device_not_present(), draw_device_not_supported(), and draw_device_present().
#define STARTUP_MESSAGE_X 0 |
Referenced by draw_device_not_present(), draw_device_not_supported(), and draw_device_present().
#define STARTUP_MESSAGE_Y (ET024006_HEIGHT-STARTUP_MESSAGE_HEIGHT) |
Referenced by draw_device_not_present(), draw_device_not_supported(), and draw_device_present().
#define TIME_FONT FONT8x8 |
Referenced by draw_play_view_print_total_time(), and draw_playtime_update().
#define TITLE_CHARS_MAX 26 |
Referenced by draw_play_view_print_title().
#define TITLE_CHARS_MAX STR_MAX_LENGTH |
#define TITLE_FONT FONT8x8 |
Referenced by draw_play_view_print_title().
#define TITLE_HEIGHT 8 |
Referenced by draw_play_view_print_title().
#define TITLE_POS_X 110 |
Referenced by draw_play_view_print_title().
#define TITLE_POS_Y 78 |
Referenced by draw_play_view_print_title().
#define TITLE_WIDTH (ET024006_WIDTH-TITLE_POS_X) |
Referenced by draw_play_view_print_title().
#define TOTAL_TIME_HEIGHT 8 |
Referenced by draw_play_view_print_total_time().
#define TOTAL_TIME_POS_X 250 |
Referenced by draw_play_view_print_total_time().
#define TOTAL_TIME_POS_Y 200 |
Referenced by draw_play_view_print_total_time().
#define TOTAL_TIME_WIDTH 64 |
Referenced by draw_play_view_print_total_time().
#define VERSION_FONT FONT8x8 |
Referenced by draw_startup().
#define VERSION_FONT_COLOR WHITE |
Referenced by draw_startup().
#define VERSION_POS_X 5 |
Referenced by draw_startup().
#define VERSION_POS_Y 230 |
Referenced by draw_startup().
#define VOLUME_BAR_COLOR 0xFD60 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_HEIGHT 18 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL10_HEIGHT 12 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL1_HEIGHT 1 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL2_HEIGHT 2 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL3_HEIGHT 3 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL4_HEIGHT 4 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL5_HEIGHT 5 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL6_HEIGHT 6 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL7_HEIGHT 8 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL8_HEIGHT 9 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_LEVEL9_HEIGHT 10 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_PART_WIDTH 8 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_POS_X 175 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_POS_Y 158 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_SPACING 3 |
Referenced by draw_volume_bar().
#define VOLUME_BAR_WIDTH 111 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_1 30 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_10 245 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_2 60 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_3 90 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_4 120 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_5 150 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_6 180 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_7 200 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_8 215 |
Referenced by draw_volume_bar().
#define VOLUME_LEVEL_9 230 |
Referenced by draw_volume_bar().
#define VOLUME_MUTED 10 |
Referenced by draw_volume_bar().
enum transition_t |
|
static |
References AUDIO_PLAYER_IMAGE, CONFIG_IMAGE, DISK_NAV_IMAGE, et024006_PutPixmap(), ET024006_WIDTH, 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_PLAYBACK, GUI_UPDATE_VIEW_PLAYBACK_TRANSITION, IN_PROGRESS_SPRITE_HEIGHT, IN_PROGRESS_SPRITE_WIDTH, ram_files, ram_file_t::start_addr, and STARTUP_IMAGE.
Referenced by gui_update().
|
static |
References Abs, draw_device_type(), ET024006_HEIGHT, et024006_PutPixmap(), ET024006_WIDTH, and ram_files.
Referenced by draw_config(), draw_navigation(), draw_play_view(), and draw_startup().
|
static |
References APPLI_BG_COLOR, CONFIG_IMAGE, draw_background(), et024006_DrawFilledRect(), ET024006_HEIGHT, ET024006_WIDTH, and ram_files.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, APPLI_FG_COLOR, CONFIG_IMAGE, CURSOR_FONT, CURSOR_FONT_WIDTH, CURSOR_POS_X, CURSOR_RANGE_HEIGHT, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, display_file_list::mode_pos, ram_files, REPEAT_POS_Y, and SHUFFLE_POS_Y.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_REPEAT_ALL, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, CONFIG_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, player_info::repeat, REPEAT_FONT, REPEAT_FONT_HEIGHT, REPEAT_FONT_WIDTH, REPEAT_MESSAGE_HEIGHT, REPEAT_POS_X, and REPEAT_POS_Y.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_SHUFFLE_ALL, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_OFF, CONFIG_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, REPEAT_FONT_HEIGHT, player_info::shuffle, SHUFFLE_FONT, SHUFFLE_FONT_HEIGHT, SHUFFLE_FONT_WIDTH, SHUFFLE_MESSAGE_HEIGHT, SHUFFLE_POS_X, and SHUFFLE_POS_Y.
Referenced by gui_update().
References AUDIO_PLAYER_IMAGE, COVER, COVER_HEIGHT, COVER_POS_X, COVER_POS_Y, COVER_WIDTH, et024006_PutPixmap(), ET024006_WIDTH, ai_image_size_t::height, file_info::image_data, Min, ram_files, file_info::size, and ai_image_size_t::width.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, APPLI_FG_COLOR, et024006_PrintString(), FILE_LIST_FONT, FILE_LIST_POS_X, and FILE_LIST_POS_Y.
Referenced by gui_update().
|
static |
References et024006_PutPixmap(), ET024006_WIDTH, ram_files, STARTUP_IMAGE, STARTUP_MESSAGE_HEIGHT, STARTUP_MESSAGE_WIDTH, STARTUP_MESSAGE_X, and STARTUP_MESSAGE_Y.
Referenced by gui_update().
|
static |
References et024006_PutPixmap(), ET024006_WIDTH, NOT_SUPPORTED, ram_files, STARTUP_IMAGE, STARTUP_MESSAGE_HEIGHT, STARTUP_MESSAGE_NOT_SUPPORTED_WIDTH, STARTUP_MESSAGE_WIDTH, STARTUP_MESSAGE_X, and STARTUP_MESSAGE_Y.
Referenced by gui_update().
|
static |
References et024006_PutPixmap(), ET024006_WIDTH, LOADING, ram_files, STARTUP_IMAGE, STARTUP_MESSAGE_HEIGHT, STARTUP_MESSAGE_LOADING_WIDTH, STARTUP_MESSAGE_WIDTH, STARTUP_MESSAGE_X, and STARTUP_MESSAGE_Y.
Referenced by gui_update().
|
static |
References ai_is_hid_class(), ai_is_sd_mmc(), ai_is_usb_ms(), APPLI_BG_COLOR, et024006_PrintString(), and FONT8x8.
Referenced by draw_background().
|
static |
Draws the file list on the disk navigation view.
References APPLI_BG_COLOR, APPLI_FG_COLOR, DISK_NAV_IMAGE, et024006_DrawFilledRect(), et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, FILE_LIST_FONT, FILE_LIST_ITEM_HEIGHT, FILE_LIST_ITEM_X, FILE_LIST_POS_X, FILE_LIST_POS_Y, FILE_LIST_SPACING, FILE_LIST_WIDTH, file_elt::file_name, display_file_list::list, MAX_DISPLAY_FILE, display_file_list::nb_elts, ram_files, and file_elt::updated.
Referenced by gui_update().
|
static |
References et024006_PutPixmap(), IN_PROGRESS, IN_PROGRESS_SPRITE_HEIGHT, IN_PROGRESS_SPRITE_NB, IN_PROGRESS_SPRITE_WIDTH, and ram_files.
Referenced by gui_update().
|
static |
Draws the navigation on the screen.
References APPLI_BG_COLOR, DISK_NAV_IMAGE, draw_background(), et024006_DrawFilledRect(), ET024006_HEIGHT, ET024006_WIDTH, and ram_files.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, et024006_PrintString(), FILE_LIST_FONT, FILE_LIST_ITEM_X, FILE_LIST_POS_X, and FILE_LIST_POS_Y.
Referenced by gui_update().
|
static |
References APPLI_BG_COLOR, AUDIO_PLAYER_IMAGE, et024006_DrawFilledRect(), et024006_PutPixmap(), ET024006_WIDTH, PAUSE_BUTTON_COLOR, PAUSE_BUTTON_HEIGHT, PAUSE_BUTTON_PART_WIDTH, PAUSE_BUTTON_POS_X, PAUSE_BUTTON_POS_Y, PAUSE_BUTTON_SPACING, PLAY_BUTTON_HEIGHT, PLAY_BUTTON_POS_X, PLAY_BUTTON_POS_Y, PLAY_BUTTON_WIDTH, and ram_files.
Referenced by gui_update().
|
static |
References AUDIO_PLAYER_IMAGE, et024006_DrawFilledRect(), et024006_DrawVertLine(), et024006_PutPixmap(), ET024006_WIDTH, PAUSE_BUTTON_COLOR, PAUSE_BUTTON_HEIGHT, PAUSE_BUTTON_POS_X, PAUSE_BUTTON_POS_Y, PAUSE_BUTTON_WIDTH, PLAY_BUTTON_POS_X, PLAY_BUTTON_POS_Y, and ram_files.
Referenced by gui_update().
|
static |
Draw the play view. Draws all elements in the play view.
offset_x | X offset of the picture. |
offset_y | Y offset of the picture. |
References AUDIO_PLAYER_IMAGE, BLACK, draw_background(), et024006_DrawFilledRect(), ET024006_HEIGHT, ET024006_WIDTH, and ram_files.
Referenced by gui_update().
References APPLI_BG_COLOR, APPLI_FG_COLOR, file_info::artist, ARTIST_CHARS_MAX, ARTIST_FONT, ARTIST_HEIGHT, ARTIST_POS_X, ARTIST_POS_Y, ARTIST_WIDTH, AUDIO_PLAYER_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, and ram_files.
Referenced by gui_update().
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_PLAYER_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, FILE_NAME_FONT, FILE_NAME_HEIGHT, FILE_NAME_POS_X, FILE_NAME_POS_Y, FILE_NAME_WIDTH, file_info::name, NAME_CHARS_MAX, and ram_files.
Referenced by gui_update().
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_PLAYER_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, file_info::title, TITLE_CHARS_MAX, TITLE_FONT, TITLE_HEIGHT, TITLE_POS_X, TITLE_POS_Y, and TITLE_WIDTH.
Referenced by gui_update().
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_PLAYER_IMAGE, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, TIME_FONT, file_info::total_time, TOTAL_TIME_HEIGHT, TOTAL_TIME_POS_X, TOTAL_TIME_POS_Y, and TOTAL_TIME_WIDTH.
Referenced by gui_update().
Draws the elements that need periodic update in the play view.
Updates the current play time.
References APPLI_BG_COLOR, APPLI_FG_COLOR, AUDIO_PLAYER_IMAGE, draw_song_progress_bar(), file_info::elapsed_time, ELAPSED_TIME_HEIGHT, ELAPSED_TIME_POS_X, ELAPSED_TIME_POS_Y, ELAPSED_TIME_WIDTH, et024006_DrawFilledRect(), et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, and TIME_FONT.
Referenced by gui_update().
Draws the song progress bar on the screen.
init | If true the progress bar is initialized which should be done after a song change or after a new draw of the play view. If the progress bar should just be updated call with false |
ptime | Current play time in milliseconds. |
current_file_info | contains the total play time length |
References AUDIO_PLAYER_IMAGE, file_info::elapsed_time, et024006_DrawFilledRect(), et024006_PutPixmap(), ET024006_WIDTH, Min, ram_files, SONG_BAR_FILL_COLOR, SONG_BAR_HEIGHT, SONG_BAR_POS_X, SONG_BAR_POS_Y, SONG_BAR_WIDTH, and file_info::total_time.
Referenced by draw_playtime_update().
|
static |
Draw the startup image on the display.
References APPLI_BG_COLOR, AUDIO_PLAYER_APPLICATION_VERSION, draw_background(), et024006_DrawFilledRect(), ET024006_HEIGHT, et024006_PrintString(), ET024006_WIDTH, ram_files, STARTUP_IMAGE, VERSION_FONT, VERSION_FONT_COLOR, VERSION_POS_X, and VERSION_POS_Y.
Referenced by gui_init(), and gui_update().
|
static |
References ET024006_WIDTH, TRANSITION_FROM_LEFT_TO_RIGHT, and TRANSITION_FROM_RIGHT_TO_LEFT.
Referenced by gui_update().
Draws the volume bar on the playing view.
References AUDIO_PLAYER_IMAGE, et024006_DrawFilledRect(), et024006_PutPixmap(), ET024006_WIDTH, ram_files, file_info::volume, VOLUME_BAR_COLOR, VOLUME_BAR_HEIGHT, VOLUME_BAR_LEVEL10_HEIGHT, VOLUME_BAR_LEVEL1_HEIGHT, VOLUME_BAR_LEVEL2_HEIGHT, VOLUME_BAR_LEVEL3_HEIGHT, VOLUME_BAR_LEVEL4_HEIGHT, VOLUME_BAR_LEVEL5_HEIGHT, VOLUME_BAR_LEVEL6_HEIGHT, VOLUME_BAR_LEVEL7_HEIGHT, VOLUME_BAR_LEVEL8_HEIGHT, VOLUME_BAR_LEVEL9_HEIGHT, VOLUME_BAR_PART_WIDTH, VOLUME_BAR_POS_X, VOLUME_BAR_POS_Y, VOLUME_BAR_SPACING, VOLUME_BAR_WIDTH, VOLUME_LEVEL_1, VOLUME_LEVEL_10, VOLUME_LEVEL_2, VOLUME_LEVEL_3, VOLUME_LEVEL_4, VOLUME_LEVEL_5, VOLUME_LEVEL_6, VOLUME_LEVEL_7, VOLUME_LEVEL_8, VOLUME_LEVEL_9, and VOLUME_MUTED.
Referenced by gui_update().
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.
fcpu_hz | CPU frequency. |
fhsb_hz | HSB frequency. |
fpbb_hz | PBB frequency. |
fpba_hz | PBA 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.
view | The view to update. |
element | The elements of the view to be update. |
lst_str | The list of file in the current directory. |
info | Information of the selected file. |
player | Information 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().