Data Structures | |
struct | ai_async_context_t |
struct | ai_fct_set |
struct | ai_image_size_t |
struct | Ai_player_flag_t |
union | St_ai_info_version |
Macros | |
#define | PLAYER_FLAG_FFW 1 |
#define | PLAYER_FLAG_FRW 2 |
#define | PLAYER_FLAG_NORMAL 0 |
#define | PLAYER_FLAG_PAUSE 2 |
#define | PLAYER_FLAG_PLAY 1 |
#define | PLAYER_FLAG_STOP 0 |
Definition of the repeat modes | |
#define | AUDIO_REPEAT_OFF 0 |
#define | AUDIO_REPEAT_TRACK 1 |
#define | AUDIO_REPEAT_FOLDER 2 |
#define | AUDIO_REPEAT_ALL 3 |
Definition of the shuffle modes | |
#define | AUDIO_SHUFFLE_OFF 0 |
#define | AUDIO_SHUFFLE_FOLDER 1 |
#define | AUDIO_SHUFFLE_ALL 2 |
Definition of the explorer modes | |
#define | AUDIO_EXPLORER_MODE_DISKS 0 |
#define | AUDIO_EXPLORER_MODE_DISK 1 |
#define | AUDIO_EXPLORER_MODE_DIRONLY 2 |
#define | AUDIO_EXPLORER_MODE_DIRSUB 3 |
Definition of the song type | |
#define | AUDIO_TYPE_UNKNOWN 0 |
#define | AUDIO_TYPE_MP1 1 |
#define | AUDIO_TYPE_MP2 2 |
#define | AUDIO_TYPE_MP3 3 |
#define | AUDIO_TYPE_WAV 5 |
Typedefs | |
typedef uint8_t | Ai_explorer_mode |
Structure to store the explorer mode option. More... | |
typedef uint8_t | Ai_repeat_mode |
Structure to store the repeat option. More... | |
typedef uint8_t | Ai_shuffle_mode |
Structure to store the shuffle option. More... | |
Functions | |
static __always_inline bool | ai_async_audio_context_restore (void *ctx) |
Restores an audio context (possibly restart play). More... | |
static __always_inline bool | ai_async_audio_context_save (void) |
Gives the full audio context (player state, play time, repeat, shuffle, file played, explorer mode ) More... | |
static __always_inline bool | ai_async_audio_ctrl_ffw (uint32_t u32_duration) |
Fast Forward. More... | |
static __always_inline bool | ai_async_audio_ctrl_frw (uint32_t u32_duration) |
Fast Rewind. More... | |
static __always_inline bool | ai_async_audio_ctrl_pause (void) |
Pause the current audio file. More... | |
static __always_inline bool | ai_async_audio_ctrl_resume (void) |
Plays the current audio file. More... | |
static __always_inline bool | ai_async_audio_ctrl_start_ffw (void) |
Start Fast Forward. More... | |
static __always_inline bool | ai_async_audio_ctrl_start_frw (void) |
Start Fast Rewind. More... | |
static __always_inline bool | ai_async_audio_ctrl_status (void) |
Returns the current status of audio player. More... | |
static __always_inline bool | ai_async_audio_ctrl_stop (void) |
Stops the player. More... | |
static __always_inline bool | ai_async_audio_ctrl_stop_ffw_frw (void) |
Stop FastForward/FastRewind. More... | |
static __always_inline bool | ai_async_audio_ctrl_time (void) |
Returns the current played time (ms). More... | |
static __always_inline bool | ai_async_audio_nav_eof_occur (void) |
Start next file. More... | |
static __always_inline bool | ai_async_audio_nav_expmode_get (void) |
Returns the used mode. More... | |
static __always_inline bool | ai_async_audio_nav_expmode_set (Ai_explorer_mode exp_mode) |
Selects the loop mode. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_album (void) |
Returns the album name of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_artist (void) |
Returns the artist's name of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_duration (void) |
Returns the track duration of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_genre (void) |
Returns the genre of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_image (ai_image_size_t *size) |
Returns a pointer and image information of the embedded image of the selected track. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_title (void) |
Returns title of current song file selected. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_track (void) |
Returns the track info of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_type (void) |
Return the file extension of the current file selected. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_version (void) |
Return the version of the metadata storage method used for the selected file. More... | |
static __always_inline bool | ai_async_audio_nav_file_info_year (void) |
Returns the year of current selected file. More... | |
static __always_inline bool | ai_async_audio_nav_getname (void) |
Gets the name of current played file. More... | |
static __always_inline bool | ai_async_audio_nav_getpos (void) |
Gives the position of play file. More... | |
static __always_inline bool | ai_async_audio_nav_nb (void) |
Number of song file present in current played directory or the number of file present in played playlist. More... | |
static __always_inline bool | ai_async_audio_nav_next (void) |
Goes to the next file to play. More... | |
static __always_inline bool | ai_async_audio_nav_playfile (void) |
Starts the play of current file selected in File System navigation. More... | |
static __always_inline bool | ai_async_audio_nav_previous (void) |
Goes to the previous file to play. More... | |
static __always_inline bool | ai_async_audio_nav_repeat_get (void) |
Gets the repeat mode. More... | |
static __always_inline bool | ai_async_audio_nav_repeat_set (Ai_repeat_mode repeat_mode) |
Sets the repeat mode. More... | |
static __always_inline bool | ai_async_audio_nav_setpos (uint16_t u16_pos) |
Change the position of play file. More... | |
static __always_inline bool | ai_async_audio_nav_shuffle_get (void) |
Gets the shuffle mode. More... | |
static __always_inline bool | ai_async_audio_nav_shuffle_set (Ai_shuffle_mode shuffle) |
Sets the shuffle mode. More... | |
static __always_inline bool | ai_async_get_product_id (void) |
Return the device identifier. More... | |
static __always_inline bool | ai_async_get_serial_number (void) |
Return the serial number of the connected device. More... | |
static __always_inline bool | ai_async_get_vendor_id (void) |
Return the vendor identifier. More... | |
static __always_inline bool | ai_async_is_device_connected (void) |
Here is the list of the ASYNCHRONOUS functions. More... | |
static __always_inline bool | ai_async_nav_dir_cd (void) |
Enters in the current directory selected in file list filtered. More... | |
static __always_inline bool | ai_async_nav_dir_gotoparent (void) |
Goes to the parent directory of current directory corresponding at file list filtered. More... | |
static __always_inline bool | ai_async_nav_dir_name (void) |
Returns the file name of current parent directory. More... | |
static __always_inline bool | ai_async_nav_dir_nb (void) |
Computes the number of directories in the filtered list. More... | |
static __always_inline bool | ai_async_nav_dir_root (void) |
Initializes the file list filtered on the root directory. More... | |
static __always_inline bool | ai_async_nav_drive_free_space (void) |
Get the free space in bytes available on the device. More... | |
static __always_inline bool | ai_async_nav_drive_get (void) |
Returns the number of the selected drive. More... | |
static __always_inline bool | ai_async_nav_drive_mount (void) |
Mounts the current drive selected. More... | |
static __always_inline bool | ai_async_nav_drive_nb (void) |
Return the number of drives. More... | |
static __always_inline bool | ai_async_nav_drive_set (uint8_t u8_number) |
Selects the drive in current navigator but do not mount it. More... | |
static __always_inline bool | ai_async_nav_drive_total_space (void) |
Get the total space in bytes available on the device. More... | |
static __always_inline bool | ai_async_nav_file_goto (uint32_t u32_newpos) |
Goes to a position in the filtered list. More... | |
static __always_inline bool | ai_async_nav_file_info_album (void) |
Returns the album of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_artist (void) |
Returns the artist of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_duration (void) |
Returns the track duration of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_genre (void) |
Return the genre of the current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_image (ai_image_size_t *size) |
Returns a pointer and image information of the embedded image of the selected track. More... | |
static __always_inline bool | ai_async_nav_file_info_title (void) |
Returns the title of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_track (void) |
Returns the track name of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_type (void) |
Return the file extension of the current file selected. More... | |
static __always_inline bool | ai_async_nav_file_info_version (void) |
Return the version of the metadata storage method used for the selected file. More... | |
static __always_inline bool | ai_async_nav_file_info_year (void) |
Returns the year of current selected file. More... | |
static __always_inline bool | ai_async_nav_file_isdir (void) |
Returns the type of the selected file. More... | |
static __always_inline bool | ai_async_nav_file_name (void) |
Returns the file name of the current file selected. More... | |
static __always_inline bool | ai_async_nav_file_nb (void) |
Computes the number of files in the filtered list. More... | |
static __always_inline bool | ai_async_nav_file_next (void) |
Goes to the next file of the filtered list. More... | |
static __always_inline bool | ai_async_nav_file_pos (void) |
Returns the position of selected file in list filtered. More... | |
static __always_inline bool | ai_async_nav_file_previous (void) |
Goes to the previous file of the filtered list. More... | |
static __always_inline bool | ai_async_nav_getplayfile (void) |
Position the File system navigation on the file play. More... | |
static __always_inline bool | ai_async_nav_playlist_nb (void) |
Computes the number of playlist in the filtered list. More... | |
bool | ai_audio_context_restore (void *ctx) |
Restore a audio context (eventualy restart play). More... | |
void * | ai_audio_context_save (uint8_t *status, uint16_t *size) |
Give complete audio context (player state, play time, repeat, shuffle, file played, explorer mode ) More... | |
bool | ai_audio_ctrl_ffw (uint32_t u32_duration) |
Fast Forward. More... | |
bool | ai_audio_ctrl_frw (uint32_t u32_duration) |
Fast Rewind. More... | |
bool | ai_audio_ctrl_pause (void) |
Pause the current audio file. More... | |
bool | ai_audio_ctrl_resume (void) |
Resume the play of the current audio file. More... | |
bool | ai_audio_ctrl_start_ffw (void) |
Start Fast Forward. More... | |
bool | ai_audio_ctrl_start_frw (void) |
Start Fast Rewind. More... | |
Ai_player_flag_t | ai_audio_ctrl_status (void) |
Return the current status of player. More... | |
bool | ai_audio_ctrl_stop (void) |
Stop the player. More... | |
bool | ai_audio_ctrl_stop_ffw_frw (void) |
Stop FastForward/FastRewind. More... | |
uint32_t | ai_audio_ctrl_time (void) |
Return current time played. More... | |
bool | ai_audio_nav_eof_occur (void) |
Start next file. More... | |
Ai_explorer_mode | ai_audio_nav_expmode_get (void) |
This function returns the mode used. More... | |
void | ai_audio_nav_expmode_set (Ai_explorer_mode exp_mode) |
This function selects the loop mode. More... | |
uint16_t | ai_audio_nav_file_info_album (char **sz_album) |
Return album of current song file selected. More... | |
uint16_t | ai_audio_nav_file_info_artist (char **sz_artist) |
Return artist of current song file selected. More... | |
uint32_t | ai_audio_nav_file_info_duration (void) |
Return duration of current song file selected. More... | |
uint16_t | ai_audio_nav_file_info_genre (char **sz_genre) |
Return genre of current song file selected. More... | |
void * | ai_audio_nav_file_info_image (ai_image_size_t *size) |
Returns a pointer and image information of the embedded image of the selected track. More... | |
uint16_t | ai_audio_nav_file_info_title (char **sz_title) |
Return title of current song file selected. More... | |
uint32_t | ai_audio_nav_file_info_track (void) |
Return track of current song file selected. More... | |
uint32_t | ai_audio_nav_file_info_type (void) |
Return the type of the song for the selected file. More... | |
St_ai_info_version | ai_audio_nav_file_info_version (void) |
Return the version of the metadata storage method used for the selected file. More... | |
uint16_t | ai_audio_nav_file_info_year (void) |
Return year of current song file selected. More... | |
uint16_t | ai_audio_nav_getname (char **string) |
Get name of current file played. More... | |
uint16_t | ai_audio_nav_getpos (void) |
Give the position of play file. More... | |
uint16_t | ai_audio_nav_nb (void) |
Number of song file present in current directory played or the number of file present in playlist played. More... | |
bool | ai_audio_nav_next (void) |
Go to next file to play. More... | |
bool | ai_audio_nav_playfile (void) |
Start the play of current file selected in File System navigation. More... | |
bool | ai_audio_nav_previous (void) |
Go to previous file to play. More... | |
Ai_repeat_mode | ai_audio_nav_repeat_get (void) |
Get repeat mode. More... | |
void | ai_audio_nav_repeat_set (Ai_repeat_mode repeat_mode) |
Set repeat mode. More... | |
bool | ai_audio_nav_setpos (uint16_t u16_pos) |
Set audio navigation at a position. More... | |
Ai_shuffle_mode | ai_audio_nav_shuffle_get (void) |
This function return the shuffle mode used. More... | |
void | ai_audio_nav_shuffle_set (Ai_shuffle_mode shuffle) |
This function selects the shuffle mode. More... | |
void | ai_command_abort (void) |
Aborts the current command. More... | |
ai_device_status_t | ai_get_device_status (void) |
Tells the status of the device connected. More... | |
uint16_t | ai_get_product_id (void) |
Return the product identifier. More... | |
uint16_t | ai_get_serial_number (char **sz_sn) |
Return the serial number of the connected device. More... | |
uint16_t | ai_get_vendor_id (void) |
Return the vendor identifier. More... | |
void | ai_init (void) |
Initialize the Audio Interface. More... | |
bool | ai_is_hid_class (void) |
Returns true if the application is using hid class; false otherwise. More... | |
bool | ai_is_none (void) |
Returns true if no devices are connected. More... | |
bool | ai_is_sd_mmc (void) |
Returns true if the application is using sd/mmc card support; false otherwise. More... | |
bool | ai_is_usb_ms (void) |
Returns true if the current device is a USB mass storage device; false otherwise. More... | |
bool | ai_nav_dir_cd (void) |
Enters in the current directory selected in file list filtered. More... | |
bool | ai_nav_dir_gotoparent (void) |
Goes to the parent directory of current directory corresponding at file list filtered. More... | |
uint16_t | ai_nav_dir_name (char **string) |
Return the file name of current parent directory. More... | |
uint16_t | ai_nav_dir_nb (void) |
Computes the number of directories in the filtered list. More... | |
bool | ai_nav_dir_root (void) |
Initializes the file list filtered on the root directory. More... | |
uint64_t | ai_nav_drive_free_space (void) |
Get the free space in bytes available on the device. More... | |
uint8_t | ai_nav_drive_get (void) |
Returns the number of the selected drive. More... | |
bool | ai_nav_drive_mount (void) |
Mounts the current drive selected. More... | |
uint8_t | ai_nav_drive_nb (void) |
Return the number of drives. More... | |
bool | ai_nav_drive_set (uint8_t u8_number) |
Selects the drive in current navigator but do not mount it. More... | |
uint64_t | ai_nav_drive_total_space (void) |
Get the total space in bytes available on the device. More... | |
bool | ai_nav_file_goto (uint32_t u32_newpos) |
Goes to a position in the filtered list. More... | |
uint16_t | ai_nav_file_info_album (char **sz_album) |
Return album of current file selected. More... | |
uint16_t | ai_nav_file_info_artist (char **sz_artist) |
Return artist of current file selected. More... | |
uint32_t | ai_nav_file_info_duration (void) |
Return duration of current file selected. More... | |
uint16_t | ai_nav_file_info_genre (char **sz_genre) |
Return genre of current file selected. More... | |
void * | ai_nav_file_info_image (ai_image_size_t *size) |
Returns a pointer and image information of the embedded image of the selected track. More... | |
uint16_t | ai_nav_file_info_title (char **sz_title) |
Return title of current file selected. More... | |
uint32_t | ai_nav_file_info_track (void) |
Return track of current file selected. More... | |
uint32_t | ai_nav_file_info_type (void) |
Return the type of the song for the selected file. More... | |
St_ai_info_version | ai_nav_file_info_version (void) |
Return the version of the metadata storage method used for the selected file. More... | |
uint16_t | ai_nav_file_info_year (void) |
Return year of current file selected. More... | |
bool | ai_nav_file_isdir (void) |
Returns the type of the selected file. More... | |
uint16_t | ai_nav_file_name (char **string) |
Return the file name of current file selected. More... | |
uint16_t | ai_nav_file_nb (void) |
Computes the number of files in the filtered list. More... | |
bool | ai_nav_file_next (void) |
Goes to the next file of the filtered list. More... | |
uint16_t | ai_nav_file_pos (void) |
Returns the position of selected file in list filtered. More... | |
bool | ai_nav_file_previous (void) |
Goes to the previous file of the filtered list. More... | |
bool | ai_nav_getplayfile (void) |
Position the File system navigation on the file play. More... | |
uint16_t | ai_nav_playlist_nb (void) |
Computes the number of playlist in the filtered list. More... | |
void | ai_task (void) |
Task for the internal behaviors of the Audio Interface. More... | |
Empty functions | |
The following describes empty entries which can be used if a feature is not available on a specific interface | |
static void | ai_init_null (void) |
static ai_device_status_t | ai_get_device_status_null (ai_async_status_t *status) |
static uint16_t | ai_get_product_id_null (ai_async_status_t *status) |
static uint16_t | ai_get_vendor_id_null (ai_async_status_t *status) |
static uint16_t | ai_get_serial_number_null (char **str, ai_async_status_t *status) |
static uint8_t | ai_nav_drive_nb_null (ai_async_status_t *status) |
static bool | ai_nav_drive_set_null (uint8_t n, ai_async_status_t *status) |
static uint8_t | ai_nav_drive_get_null (ai_async_status_t *status) |
static bool | ai_nav_drive_mount_null (ai_async_status_t *status) |
static uint64_t | ai_nav_drive_total_space_null (ai_async_status_t *status) |
static uint64_t | ai_nav_drive_free_space_null (ai_async_status_t *status) |
static bool | ai_nav_dir_root_null (ai_async_status_t *status) |
static bool | ai_nav_dir_cd_null (ai_async_status_t *status) |
static bool | ai_nav_dir_gotoparent_null (ai_async_status_t *status) |
static bool | ai_nav_file_isdir_null (ai_async_status_t *status) |
static bool | ai_nav_file_next_null (ai_async_status_t *status) |
static bool | ai_nav_file_previous_null (ai_async_status_t *status) |
static bool | ai_nav_file_goto_null (uint32_t n, ai_async_status_t *status) |
static uint32_t | ai_nav_file_pos_null (ai_async_status_t *status) |
static uint16_t | ai_nav_file_nb_null (ai_async_status_t *status) |
static uint16_t | ai_nav_dir_nb_null (ai_async_status_t *status) |
static uint16_t | ai_nav_playlist_nb_null (ai_async_status_t *status) |
static uint16_t | ai_nav_dir_name_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_nav_file_name_null (char **str, ai_async_status_t *status) |
static uint32_t | ai_nav_file_info_type_null (ai_async_status_t *status) |
static St_ai_info_version | ai_nav_file_info_version_null (ai_async_status_t *status) |
static uint16_t | ai_nav_file_info_title_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_nav_file_info_artist_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_nav_file_info_album_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_nav_file_info_year_null (ai_async_status_t *status) |
static uint32_t | ai_nav_file_info_track_null (ai_async_status_t *status) |
static uint16_t | ai_nav_file_info_genre_null (char **str, ai_async_status_t *status) |
static uint32_t | ai_nav_file_info_duration_null (ai_async_status_t *status) |
static void * | ai_nav_file_info_image_null (ai_image_size_t *img, ai_async_status_t *status) |
static bool | ai_nav_getplayfile_null (ai_async_status_t *status) |
static bool | ai_audio_nav_playfile_null (ai_async_status_t *status) |
static void * | ai_audio_context_save_null (uint8_t *a, uint16_t *b, ai_async_status_t *status) |
static bool | ai_audio_context_restore_null (void *c, ai_async_status_t *status) |
static bool | ai_audio_nav_next_null (ai_async_status_t *status) |
static bool | ai_audio_nav_previous_null (ai_async_status_t *status) |
static bool | ai_audio_nav_eof_occur_null (ai_async_status_t *status) |
static uint16_t | ai_audio_nav_nb_null (ai_async_status_t *status) |
static uint16_t | ai_audio_nav_getpos_null (ai_async_status_t *status) |
static bool | ai_audio_nav_setpos_null (uint16_t n, ai_async_status_t *status) |
static Ai_repeat_mode | ai_audio_nav_repeat_get_null (ai_async_status_t *status) |
static void | ai_audio_nav_repeat_set_null (Ai_repeat_mode m, ai_async_status_t *status) |
static Ai_explorer_mode | ai_audio_nav_expmode_get_null (ai_async_status_t *status) |
static void | ai_audio_nav_expmode_set_null (Ai_explorer_mode m, ai_async_status_t *status) |
static Ai_shuffle_mode | ai_audio_nav_shuffle_get_null (ai_async_status_t *status) |
static void | ai_audio_nav_shuffle_set_null (Ai_shuffle_mode m, ai_async_status_t *status) |
static uint16_t | ai_audio_nav_getname_null (char **str, ai_async_status_t *status) |
static uint32_t | ai_audio_nav_file_info_type_null (ai_async_status_t *status) |
static St_ai_info_version | ai_audio_nav_file_info_version_null (ai_async_status_t *status) |
static uint16_t | ai_audio_nav_file_info_title_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_audio_nav_file_info_artist_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_audio_nav_file_info_album_null (char **str, ai_async_status_t *status) |
static uint16_t | ai_audio_nav_file_info_year_null (ai_async_status_t *status) |
static uint32_t | ai_audio_nav_file_info_track_null (ai_async_status_t *status) |
static uint16_t | ai_audio_nav_file_info_genre_null (char **str, ai_async_status_t *status) |
static uint32_t | ai_audio_nav_file_info_duration_null (ai_async_status_t *status) |
static void * | ai_audio_nav_file_info_image_null (ai_image_size_t *img, ai_async_status_t *status) |
static bool | ai_audio_ctrl_stop_null (ai_async_status_t *status) |
static bool | ai_audio_ctrl_resume_null (ai_async_status_t *status) |
static bool | ai_audio_ctrl_pause_null (ai_async_status_t *status) |
static uint32_t | ai_audio_ctrl_time_null (ai_async_status_t *status) |
static Ai_player_flag_t | ai_audio_ctrl_status_null (ai_async_status_t *status) |
static bool | ai_audio_ctrl_ffw_null (uint32_t n, ai_async_status_t *status) |
static bool | ai_audio_ctrl_frw_null (uint32_t n, ai_async_status_t *status) |
static bool | ai_audio_ctrl_start_ffw_null (ai_async_status_t *status) |
static bool | ai_audio_ctrl_start_frw_null (ai_async_status_t *status) |
static bool | ai_audio_ctrl_stop_ffw_frw_null (ai_async_status_t *status) |
static bool | ai_specific_async_cmd_task_null (cmd_ai_id_t a, uint32_t b, uint16_t *c, char **d, uint32_t *e, uint64_t *f, ai_async_status_t *status) |
The following routines manage the asynchronous AI functions. | |
void | ai_async_cmd_task (void) |
Launch the execution (it can be a part of the job or its full execution) of the current asynchronous command. More... | |
bool | is_ai_async_cmd_finished (void) |
Tests if the current asynchronous routine is finished. More... | |
uint8_t | ai_async_cmd_out_status (void) |
Returns the status of the last asynchronous command executed. More... | |
uint32_t | ai_async_cmd_out_u32 (void) |
Return the result (max 32bits) of the last asynchronous command executed. More... | |
uint64_t | ai_async_cmd_out_u64 (void) |
Return the result (max 64 bits) of the last asynchronous command executed. More... | |
uint16_t | ai_async_cmd_out_SizeArrayU8 (void) |
Returns the size of the extra result (no size limit) of the last asynchronous executed command. More... | |
char * | ai_async_cmd_out_PtrArrayU8 (void) |
Returns the pointer on extra result of the last asynchronous command executed. More... | |
void | ai_async_cmd_out_free_ArrayU8 (void) |
Free the allocated buffer which holds the extra-result. More... | |
bool | ai_async_cmd_put (cmd_ai_id_t cmd_id, uint32_t u32_in, uint16_t u16_arg_size, char *u8_arg_in, bool need_extra_buffer) |
This routine may be use to send directly a command values from a communication port to audio interface. More... | |
Context specific commands | |
bool | ai_async_context_push (ai_async_context_t *ctx) |
Push a new context into the stack. More... | |
bool | ai_async_context_pop (ai_async_context_t *ctx) |
Pop a context from the stack. More... | |
void | ai_async_update_cmd_status (ai_async_status_t *cmd_ai_status) |
Update the current command status. More... | |
Variables | |
uint8_t | g_retry_cnt |
Number of retries before aborting the command. More... | |
#define AUDIO_EXPLORER_MODE_DIRONLY 2 |
Referenced by ai_usb_ms_audio_nav_expmode_get(), and ai_usb_ms_audio_nav_expmode_set().
#define AUDIO_EXPLORER_MODE_DIRSUB 3 |
Referenced by ai_usb_ms_audio_nav_expmode_get(), and ai_usb_ms_audio_nav_expmode_set().
#define AUDIO_EXPLORER_MODE_DISK 1 |
#define AUDIO_EXPLORER_MODE_DISKS 0 |
Referenced by ai_usb_ms_audio_nav_expmode_get(), and ai_usb_ms_audio_nav_expmode_set().
#define AUDIO_REPEAT_ALL 3 |
Referenced by ai_usb_ms_audio_nav_eof_occur(), config_task(), and draw_config_view_print_repeat().
#define AUDIO_REPEAT_FOLDER 2 |
Referenced by ai_usb_ms_audio_nav_eof_occur(), ai_usb_ms_audio_nav_mov(), config_task(), and draw_config_view_print_repeat().
#define AUDIO_REPEAT_OFF 0 |
Referenced by ai_audio_nav_repeat_get_null(), config_task(), and draw_config_view_print_repeat().
#define AUDIO_REPEAT_TRACK 1 |
Referenced by ai_usb_ms_audio_nav_eof_occur(), ai_usb_ms_audio_nav_mov(), config_task(), and draw_config_view_print_repeat().
#define AUDIO_SHUFFLE_ALL 2 |
Referenced by ai_usb_ms_audio_nav_shuffle_set(), config_task(), and draw_config_view_print_shuffle().
#define AUDIO_SHUFFLE_FOLDER 1 |
#define AUDIO_SHUFFLE_OFF 0 |
#define AUDIO_TYPE_MP1 1 |
Referenced by ai_usb_ms_audio_nav_file_info_type(), and ai_usb_ms_nav_file_info_type().
#define AUDIO_TYPE_MP2 2 |
Referenced by ai_usb_ms_audio_nav_file_info_type(), and ai_usb_ms_nav_file_info_type().
#define AUDIO_TYPE_MP3 3 |
Referenced by ai_usb_ms_audio_nav_file_info_type(), and ai_usb_ms_nav_file_info_type().
#define AUDIO_TYPE_UNKNOWN 0 |
Referenced by ai_usb_ms_audio_nav_file_info_type(), and ai_usb_ms_nav_file_info_type().
#define AUDIO_TYPE_WAV 5 |
Referenced by ai_usb_ms_audio_nav_file_info_type(), and ai_usb_ms_nav_file_info_type().
#define PLAYER_FLAG_FFW 1 |
Referenced by ai_usb_ms_audio_context_restore(), ai_usb_ms_audio_ctrl_ffw(), play_wav(), and playback_task().
#define PLAYER_FLAG_FRW 2 |
Referenced by ai_usb_ms_audio_context_restore(), ai_usb_ms_audio_ctrl_frw(), play_wav(), and playback_task().
#define PLAYER_FLAG_NORMAL 0 |
Referenced by ai_usb_ms_audio_ctrl_resume(), and play_wav().
#define PLAYER_FLAG_PAUSE 2 |
#define PLAYER_FLAG_PLAY 1 |
Referenced by ai_usb_ms_audio_context_restore(), ai_usb_ms_audio_ctrl_resume(), play_wav(), and playback_task().
#define PLAYER_FLAG_STOP 0 |
typedef uint8_t Ai_explorer_mode |
Structure to store the explorer mode option.
typedef uint8_t Ai_repeat_mode |
Structure to store the repeat option.
typedef uint8_t Ai_shuffle_mode |
Structure to store the shuffle option.
enum ai_async_status_t |
enum ai_device_status_t |
enum cmd_ai_id_t |
|
static |
Restores an audio context (possibly restart play).
ctx | structure with all information about context to restore |
References ai_async_cmd_put(), and CMD_AI_AUDIO_CONTEXT_RESTORE.
|
static |
Gives the full audio context (player state, play time, repeat, shuffle, file played, explorer mode )
References ai_async_cmd_put(), and CMD_AI_AUDIO_CONTEXT_SAVE.
Referenced by ai_audio_context_save().
|
static |
Fast Forward.
u32_duration | duration of FFW in seconds |
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_FFW.
|
static |
Fast Rewind.
u32_duration | duration of FFW in seconds |
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_FRW.
|
static |
Pause the current audio file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_PAUSE.
Referenced by playback_task().
|
static |
Plays the current audio file.
u32_time_start | time at start the play |
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_RESUME.
Referenced by command_task(), playback_task(), and track_changed_task().
|
static |
Start Fast Forward.
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_START_FFW.
Referenced by playback_task().
|
static |
Start Fast Rewind.
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_START_FRW.
Referenced by playback_task().
|
static |
Returns the current status of audio player.
TODO: Add more status flags (new file played, file stopped, TBD)...
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_STATUS.
Referenced by check_device_task(), and track_changed_task().
|
static |
Stops the player.
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_STOP.
|
static |
Stop FastForward/FastRewind.
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_STOP_FFW_FRW.
Referenced by playback_task().
|
static |
Returns the current played time (ms).
References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_TIME.
Referenced by playback_task().
|
static |
Start next file.
TODO: TBD
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EOF_OCCUR.
|
static |
Returns the used mode.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EXPMODE_GET.
|
static |
Selects the loop mode.
exp_mode | mode to select (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB) |
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EXPMODE_SET.
|
static |
Returns the album name of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_ALBUM.
|
static |
Returns the artist's name of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_ARTIST.
Referenced by track_changed_task().
|
static |
Returns the track duration of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_DURATION.
Referenced by track_changed_task().
|
static |
Returns the genre of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_GENRE.
|
static |
Returns a pointer and image information of the embedded image of the selected track.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_IMAGE.
Referenced by ai_audio_nav_file_info_image(), and track_changed_task().
|
static |
Returns title of current song file selected.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TITLE.
Referenced by track_changed_task().
|
static |
Returns the track info of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TRACK.
|
static |
Return the file extension of the current file selected.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TYPE.
|
static |
Return the version of the metadata storage method used for the selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_VERSION.
|
static |
Returns the year of current selected file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_YEAR.
|
static |
Gets the name of current played file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_GETNAME.
Referenced by track_changed_task().
|
static |
Gives the position of play file.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_GETPOS.
|
static |
Number of song file present in current played directory or the number of file present in played playlist.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_NB.
|
static |
Goes to the next file to play.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_NEXT.
Referenced by playback_task().
|
static |
Starts the play of current file selected in File System navigation.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_PLAYFILE.
Referenced by navigation_task(), and playback_task().
|
static |
Goes to the previous file to play.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_PREV.
Referenced by playback_task().
|
static |
Gets the repeat mode.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_REPEAT_GET.
Referenced by config_task().
|
static |
Sets the repeat mode.
repeat_mode | repeat mode to select (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL) |
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_REPEAT_SET.
Referenced by config_task().
|
static |
Change the position of play file.
u16_pos | position to set |
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_SETPOS.
|
static |
Gets the shuffle mode.
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_SHUFFLE_GET.
Referenced by config_task().
|
static |
Sets the shuffle mode.
shuffle | shuffle mode to select (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL) |
References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_SHUFFLE_SET.
Referenced by config_task().
void ai_async_cmd_out_free_ArrayU8 | ( | void | ) |
Free the allocated buffer which holds the extra-result.
This shall be done when the "extra results" are no more needed by the application.
References g_ai_char_arg, and g_ai_u16_arg_size.
Referenced by ai_async_cmd_put().
char* ai_async_cmd_out_PtrArrayU8 | ( | void | ) |
Returns the pointer on extra result of the last asynchronous command executed.
References g_ai_char_arg.
Referenced by ai_audio_context_save(), navigation_task(), and track_changed_task().
uint16_t ai_async_cmd_out_SizeArrayU8 | ( | void | ) |
Returns the size of the extra result (no size limit) of the last asynchronous executed command.
References g_ai_u16_arg_size.
Referenced by ai_audio_context_save(), navigation_task(), and track_changed_task().
uint8_t ai_async_cmd_out_status | ( | void | ) |
Returns the status of the last asynchronous command executed.
References CMD_ERROR, g_ai_cmd_execution_status, and g_ai_status.
Referenced by ai_audio_context_save(), and com_task().
uint32_t ai_async_cmd_out_u32 | ( | void | ) |
Return the result (max 32bits) of the last asynchronous command executed.
References g_ai_u32_out.
Referenced by ai_audio_nav_file_info_image(), ai_nav_file_info_image(), check_device_task(), config_task(), navigation_task(), playback_task(), and track_changed_task().
uint64_t ai_async_cmd_out_u64 | ( | void | ) |
Return the result (max 64 bits) of the last asynchronous command executed.
References g_ai_u64_out.
bool ai_async_cmd_put | ( | cmd_ai_id_t | cmd_id, |
uint32_t | u32_in, | ||
uint16_t | u16_arg_size, | ||
char * | u8_arg_in, | ||
bool | need_extra_buffer | ||
) |
This routine may be use to send directly a command values from a communication port to audio interface.
This routine may be use to send directly a command values from a communication port to audio interface.
References ai_async_cmd_out_free_ArrayU8(), AI_CMD_RETRY_RELOAD, g_ai_char_arg, g_ai_cmdid, g_ai_u16_arg_size, g_ai_u32_in, g_b_ai_cmd_received, and g_retry_cnt.
Referenced by ai_async_audio_context_restore(), ai_async_audio_context_save(), ai_async_audio_ctrl_ffw(), ai_async_audio_ctrl_frw(), ai_async_audio_ctrl_pause(), ai_async_audio_ctrl_resume(), ai_async_audio_ctrl_start_ffw(), ai_async_audio_ctrl_start_frw(), ai_async_audio_ctrl_status(), ai_async_audio_ctrl_stop(), ai_async_audio_ctrl_stop_ffw_frw(), ai_async_audio_ctrl_time(), ai_async_audio_nav_eof_occur(), ai_async_audio_nav_expmode_get(), ai_async_audio_nav_expmode_set(), ai_async_audio_nav_file_info_album(), ai_async_audio_nav_file_info_artist(), ai_async_audio_nav_file_info_duration(), ai_async_audio_nav_file_info_genre(), ai_async_audio_nav_file_info_image(), ai_async_audio_nav_file_info_title(), ai_async_audio_nav_file_info_track(), ai_async_audio_nav_file_info_type(), ai_async_audio_nav_file_info_version(), ai_async_audio_nav_file_info_year(), ai_async_audio_nav_getname(), ai_async_audio_nav_getpos(), ai_async_audio_nav_nb(), ai_async_audio_nav_next(), ai_async_audio_nav_playfile(), ai_async_audio_nav_previous(), ai_async_audio_nav_repeat_get(), ai_async_audio_nav_repeat_set(), ai_async_audio_nav_setpos(), ai_async_audio_nav_shuffle_get(), ai_async_audio_nav_shuffle_set(), ai_async_get_product_id(), ai_async_get_serial_number(), ai_async_get_vendor_id(), ai_async_is_device_connected(), ai_async_nav_dir_cd(), ai_async_nav_dir_gotoparent(), ai_async_nav_dir_name(), ai_async_nav_dir_nb(), ai_async_nav_dir_root(), ai_async_nav_drive_free_space(), ai_async_nav_drive_get(), ai_async_nav_drive_mount(), ai_async_nav_drive_nb(), ai_async_nav_drive_set(), ai_async_nav_drive_total_space(), ai_async_nav_file_goto(), ai_async_nav_file_info_album(), ai_async_nav_file_info_artist(), ai_async_nav_file_info_duration(), ai_async_nav_file_info_genre(), ai_async_nav_file_info_image(), ai_async_nav_file_info_title(), ai_async_nav_file_info_track(), ai_async_nav_file_info_type(), ai_async_nav_file_info_version(), ai_async_nav_file_info_year(), ai_async_nav_file_isdir(), ai_async_nav_file_name(), ai_async_nav_file_nb(), ai_async_nav_file_next(), ai_async_nav_file_pos(), ai_async_nav_file_previous(), ai_async_nav_getplayfile(), ai_async_nav_playlist_nb(), ai_async_usb_ms_specific_audio_nav_get_folder_name(), ai_async_usb_ms_specific_audio_nav_playlist_play_link(), ai_async_usb_ms_specific_audio_nav_restore(), ai_async_usb_ms_specific_audio_nav_save(), ai_async_usb_ms_specific_nav_get_next_playlist_pos(), ai_async_usb_ms_specific_nav_getplaylistfile(), ai_async_usb_ms_specific_nav_playlist_link_name(), ai_async_usb_ms_specific_nav_playlist_link_nb(), ai_async_usb_ms_specific_nav_restore(), ai_async_usb_ms_specific_nav_save(), ai_async_usb_ms_specific_playlist_nav_restore(), and ai_async_usb_ms_specific_playlist_nav_save().
void ai_async_cmd_task | ( | void | ) |
Launch the execution (it can be a part of the job or its full execution) of the current asynchronous command.
Launch the execution (it can be a part of the job or its full execution) of the current asynchronous command.
References AI_ASYNC_STACK_NB_ELEMENTS, ai_specific_async_cmd_task(), ai_fct_set::audio_context_restore, ai_fct_set::audio_ctrl_ffw, ai_fct_set::audio_ctrl_frw, ai_fct_set::audio_ctrl_pause, ai_fct_set::audio_ctrl_resume, ai_fct_set::audio_ctrl_start_ffw, ai_fct_set::audio_ctrl_start_frw, ai_fct_set::audio_ctrl_stop, ai_fct_set::audio_ctrl_stop_ffw_frw, ai_fct_set::audio_ctrl_time, ai_fct_set::audio_nav_eof_occur, ai_fct_set::audio_nav_expmode_get, ai_fct_set::audio_nav_expmode_set, ai_fct_set::audio_nav_file_info_album, ai_fct_set::audio_nav_file_info_artist, ai_fct_set::audio_nav_file_info_duration, ai_fct_set::audio_nav_file_info_genre, ai_fct_set::audio_nav_file_info_title, ai_fct_set::audio_nav_file_info_track, ai_fct_set::audio_nav_file_info_type, ai_fct_set::audio_nav_file_info_version, ai_fct_set::audio_nav_file_info_year, ai_fct_set::audio_nav_getname, ai_fct_set::audio_nav_getpos, ai_fct_set::audio_nav_nb, ai_fct_set::audio_nav_next, ai_fct_set::audio_nav_playfile, ai_fct_set::audio_nav_previous, ai_fct_set::audio_nav_repeat_get, ai_fct_set::audio_nav_repeat_set, ai_fct_set::audio_nav_setpos, ai_fct_set::audio_nav_shuffle_get, ai_fct_set::audio_nav_shuffle_set, CMD_AI_AUDIO_CONTEXT_RESTORE, CMD_AI_AUDIO_CONTEXT_SAVE, CMD_AI_AUDIO_CTRL_FFW, CMD_AI_AUDIO_CTRL_FRW, CMD_AI_AUDIO_CTRL_PAUSE, CMD_AI_AUDIO_CTRL_RESUME, CMD_AI_AUDIO_CTRL_START_FFW, CMD_AI_AUDIO_CTRL_START_FRW, CMD_AI_AUDIO_CTRL_STATUS, CMD_AI_AUDIO_CTRL_STOP, CMD_AI_AUDIO_CTRL_STOP_FFW_FRW, CMD_AI_AUDIO_CTRL_TIME, CMD_AI_AUDIO_NAV_EOF_OCCUR, CMD_AI_AUDIO_NAV_EXPMODE_GET, CMD_AI_AUDIO_NAV_EXPMODE_SET, CMD_AI_AUDIO_NAV_GETNAME, CMD_AI_AUDIO_NAV_GETPOS, CMD_AI_AUDIO_NAV_INFO_ALBUM, CMD_AI_AUDIO_NAV_INFO_ARTIST, CMD_AI_AUDIO_NAV_INFO_DURATION, CMD_AI_AUDIO_NAV_INFO_GENRE, CMD_AI_AUDIO_NAV_INFO_IMAGE, CMD_AI_AUDIO_NAV_INFO_TITLE, CMD_AI_AUDIO_NAV_INFO_TRACK, CMD_AI_AUDIO_NAV_INFO_TYPE, CMD_AI_AUDIO_NAV_INFO_VERSION, CMD_AI_AUDIO_NAV_INFO_YEAR, CMD_AI_AUDIO_NAV_NB, CMD_AI_AUDIO_NAV_NEXT, CMD_AI_AUDIO_NAV_PLAYFILE, CMD_AI_AUDIO_NAV_PREV, CMD_AI_AUDIO_NAV_REPEAT_GET, CMD_AI_AUDIO_NAV_REPEAT_SET, CMD_AI_AUDIO_NAV_SETPOS, CMD_AI_AUDIO_NAV_SHUFFLE_GET, CMD_AI_AUDIO_NAV_SHUFFLE_SET, CMD_AI_GET_DEVICE_STATUS, CMD_AI_GET_PRODUCT_ID, CMD_AI_GET_SERIAL_NUMBER, CMD_AI_GET_VENDOR_ID, CMD_AI_NAV_DIR_CD, CMD_AI_NAV_DIR_GOTOPARENT, CMD_AI_NAV_DIR_NAME, CMD_AI_NAV_DIR_NB, CMD_AI_NAV_DIR_ROOT, CMD_AI_NAV_DRIVE_FREE_SPACE, CMD_AI_NAV_DRIVE_GET, CMD_AI_NAV_DRIVE_MOUNT, CMD_AI_NAV_DRIVE_NB, CMD_AI_NAV_DRIVE_SET, CMD_AI_NAV_DRIVE_TOTAL_SPACE, CMD_AI_NAV_FILE_GOTO, CMD_AI_NAV_FILE_ISDIR, CMD_AI_NAV_FILE_NAME, CMD_AI_NAV_FILE_NB, CMD_AI_NAV_FILE_NEXT, CMD_AI_NAV_FILE_POS, CMD_AI_NAV_FILE_PREVIOUS, CMD_AI_NAV_GETPLAYFILE, CMD_AI_NAV_INFO_ALBUM, CMD_AI_NAV_INFO_ARTIST, CMD_AI_NAV_INFO_DURATION, CMD_AI_NAV_INFO_GENRE, CMD_AI_NAV_INFO_IMAGE, CMD_AI_NAV_INFO_TITLE, CMD_AI_NAV_INFO_TRACK, CMD_AI_NAV_INFO_TYPE, CMD_AI_NAV_INFO_VERSION, CMD_AI_NAV_INFO_YEAR, CMD_AI_NAV_PLAYLIST_NB, CMD_ERROR, CMD_EXECUTING, current_ai_fct_set, St_ai_info_version::digit, g_ai_char_arg, g_ai_cmd_execution_status, g_ai_cmdid, g_ai_status, g_ai_u16_arg_size, g_ai_u32_in, g_ai_u32_out, g_ai_u64_out, g_b_ai_cmd_received, ai_fct_set::get_product_id, ai_fct_set::get_serial_number, ai_fct_set::get_vendor_id, St_ai_info_version::major, St_ai_info_version::minor, ai_fct_set::nav_dir_cd, ai_fct_set::nav_dir_gotoparent, ai_fct_set::nav_dir_name, ai_fct_set::nav_dir_nb, ai_fct_set::nav_dir_root, ai_fct_set::nav_drive_free_space, ai_fct_set::nav_drive_get, ai_fct_set::nav_drive_mount, ai_fct_set::nav_drive_nb, ai_fct_set::nav_drive_set, ai_fct_set::nav_drive_total_space, ai_fct_set::nav_file_goto, ai_fct_set::nav_file_info_album, ai_fct_set::nav_file_info_artist, ai_fct_set::nav_file_info_duration, ai_fct_set::nav_file_info_genre, ai_fct_set::nav_file_info_title, ai_fct_set::nav_file_info_track, ai_fct_set::nav_file_info_type, ai_fct_set::nav_file_info_version, ai_fct_set::nav_file_info_year, ai_fct_set::nav_file_isdir, ai_fct_set::nav_file_name, ai_fct_set::nav_file_nb, ai_fct_set::nav_file_next, ai_fct_set::nav_file_pos, ai_fct_set::nav_file_previous, ai_fct_set::nav_getplayfile, ai_fct_set::nav_playlist_nb, and St_ai_info_version::revision.
Referenced by ai_audio_context_save(), ai_audio_nav_file_info_image(), ai_nav_file_info_image(), codec_wav_task(), and com_task().
bool ai_async_context_pop | ( | ai_async_context_t * | ctx | ) |
Pop a context from the stack.
ctx | A pointer on an empty context structure to store the new context. |
References AI_ASYNC_STACK_NB_ELEMENTS.
Referenced by ai_usb_ms_audio_nav_mov().
bool ai_async_context_push | ( | ai_async_context_t * | ctx | ) |
Push a new context into the stack.
ctx | The new context to push. |
Referenced by ai_usb_ms_audio_nav_mov().
|
static |
Return the device identifier.
References ai_async_cmd_put(), and CMD_AI_GET_PRODUCT_ID.
|
static |
Return the serial number of the connected device.
References ai_async_cmd_put(), and CMD_AI_GET_SERIAL_NUMBER.
|
static |
Return the vendor identifier.
References ai_async_cmd_put(), and CMD_AI_GET_VENDOR_ID.
|
static |
Here is the list of the ASYNCHRONOUS functions.
Tells if a device is connected or not
References ai_async_cmd_put(), and CMD_AI_GET_DEVICE_STATUS.
|
static |
Enters in the current directory selected in file list filtered.
References ai_async_cmd_put(), and CMD_AI_NAV_DIR_CD.
Referenced by navigation_task().
|
static |
Goes to the parent directory of current directory corresponding at file list filtered.
References ai_async_cmd_put(), and CMD_AI_NAV_DIR_GOTOPARENT.
Referenced by navigation_task().
|
static |
Returns the file name of current parent directory.
References ai_async_cmd_put(), and CMD_AI_NAV_DIR_NAME.
|
static |
Computes the number of directories in the filtered list.
References ai_async_cmd_put(), and CMD_AI_NAV_DIR_NB.
|
static |
Initializes the file list filtered on the root directory.
References ai_async_cmd_put(), and CMD_AI_NAV_DIR_ROOT.
|
static |
Get the free space in bytes available on the device.
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_FREE_SPACE.
|
static |
Returns the number of the selected drive.
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_GET.
|
static |
Mounts the current drive selected.
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_MOUNT.
|
static |
Return the number of drives.
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_NB.
|
static |
Selects the drive in current navigator but do not mount it.
u8_number | device number (0 to nav_drive_nb()-1 ) |
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_SET.
|
static |
Get the total space in bytes available on the device.
References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_TOTAL_SPACE.
|
static |
Goes to a position in the filtered list.
u16_newpos | new position to select in file list, 0 is the first position |
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_GOTO.
Referenced by navigation_task().
|
static |
Returns the album of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_ALBUM.
|
static |
Returns the artist of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_ARTIST.
|
static |
Returns the track duration of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_DURATION.
|
static |
Return the genre of the current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_GENRE.
|
static |
Returns a pointer and image information of the embedded image of the selected track.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_IMAGE.
Referenced by ai_nav_file_info_image().
|
static |
Returns the title of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TITLE.
|
static |
Returns the track name of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TRACK.
|
static |
Return the file extension of the current file selected.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TYPE.
|
static |
Return the version of the metadata storage method used for the selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_VERSION.
|
static |
Returns the year of current selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_INFO_YEAR.
|
static |
Returns the type of the selected file.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_ISDIR.
Referenced by navigation_task().
|
static |
Returns the file name of the current file selected.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NAME.
Referenced by navigation_task().
|
static |
Computes the number of files in the filtered list.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NB.
|
static |
Goes to the next file of the filtered list.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NEXT.
|
static |
Returns the position of selected file in list filtered.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_POS.
|
static |
Goes to the previous file of the filtered list.
References ai_async_cmd_put(), and CMD_AI_NAV_FILE_PREVIOUS.
|
static |
Position the File system navigation on the file play.
References ai_async_cmd_put(), and CMD_AI_NAV_GETPLAYFILE.
|
static |
Computes the number of playlist in the filtered list.
References ai_async_cmd_put(), and CMD_AI_NAV_PLAYLIST_NB.
void ai_async_update_cmd_status | ( | ai_async_status_t * | cmd_ai_status | ) |
Update the current command status.
cmd_ai_status | The current command status to update |
References AI_ASYNC_STACK_NB_ELEMENTS, CMD_DONE, CMD_ERROR, and ai_async_context_t::status.
Referenced by ai_usb_ms_audio_nav_mov().
bool ai_audio_context_restore | ( | void * | ctx | ) |
Restore a audio context (eventualy restart play).
ctx | structure with all information about context to restore |
|
inlinestatic |
References CMD_DONE.
void* ai_audio_context_save | ( | uint8_t * | status, |
uint16_t * | size | ||
) |
Give complete audio context (player state, play time, repeat, shuffle, file played, explorer mode )
References ai_async_audio_context_save(), ai_async_cmd_out_PtrArrayU8(), ai_async_cmd_out_SizeArrayU8(), ai_async_cmd_out_status(), ai_async_cmd_task(), AI_SYNC_TASK_CALL_BACK, and is_ai_async_cmd_finished().
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_ffw | ( | uint32_t | u32_duration | ) |
Fast Forward.
u32_duration | duration of FFW in seconds |
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_frw | ( | uint32_t | u32_duration | ) |
Fast Rewind.
u32_duration | duration of FRW in seconds |
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_pause | ( | void | ) |
Pause the current audio file.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_resume | ( | void | ) |
Resume the play of the current audio file.
u32_time_start | time at start the play |
Referenced by codec_wav_task().
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_start_ffw | ( | void | ) |
Start Fast Forward.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_ctrl_start_frw | ( | void | ) |
Start Fast Rewind.
|
inlinestatic |
References CMD_DONE.
Ai_player_flag_t ai_audio_ctrl_status | ( | void | ) |
Return the current status of player.
|
inlinestatic |
References Ai_player_flag_t::all, and CMD_DONE.
bool ai_audio_ctrl_stop | ( | void | ) |
Stop the player.
bool ai_audio_ctrl_stop_ffw_frw | ( | void | ) |
Stop FastForward/FastRewind.
|
inlinestatic |
References CMD_DONE.
|
inlinestatic |
References CMD_DONE.
uint32_t ai_audio_ctrl_time | ( | void | ) |
Return current time played.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_nav_eof_occur | ( | void | ) |
Start next file.
Referenced by codec_wav_task().
|
inlinestatic |
References CMD_DONE.
Ai_explorer_mode ai_audio_nav_expmode_get | ( | void | ) |
This function returns the mode used.
|
inlinestatic |
References AUDIO_EXPLORER_MODE_DISK, and CMD_DONE.
void ai_audio_nav_expmode_set | ( | Ai_explorer_mode | exp_mode | ) |
This function selects the loop mode.
exp_mode | mode to select (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB) |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_file_info_album | ( | char ** | sz_album | ) |
Return album of current song file selected.
sz_album | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_file_info_artist | ( | char ** | sz_artist | ) |
Return artist of current song file selected.
sz_artist | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint32_t ai_audio_nav_file_info_duration | ( | void | ) |
Return duration of current song file selected.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_file_info_genre | ( | char ** | sz_genre | ) |
Return genre of current song file selected.
sz_genre | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
void* ai_audio_nav_file_info_image | ( | ai_image_size_t * | size | ) |
Returns a pointer and image information of the embedded image of the selected track.
size | The desire width and height of the decoded image. |
size | The actual width and height of the decoded image. |
References ai_async_audio_nav_file_info_image(), ai_async_cmd_out_u32(), ai_async_cmd_task(), AI_SYNC_TASK_CALL_BACK, and is_ai_async_cmd_finished().
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_file_info_title | ( | char ** | sz_title | ) |
Return title of current song file selected.
sz_title | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint32_t ai_audio_nav_file_info_track | ( | void | ) |
Return track of current song file selected.
|
inlinestatic |
References CMD_DONE.
uint32_t ai_audio_nav_file_info_type | ( | void | ) |
Return the type of the song for the selected file.
|
inlinestatic |
References CMD_DONE.
St_ai_info_version ai_audio_nav_file_info_version | ( | void | ) |
Return the version of the metadata storage method used for the selected file.
|
inlinestatic |
References St_ai_info_version::all, and CMD_DONE.
uint16_t ai_audio_nav_file_info_year | ( | void | ) |
Return year of current song file selected.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_getname | ( | char ** | string | ) |
Get name of current file played.
string | buffer to fill |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_getpos | ( | void | ) |
Give the position of play file.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_audio_nav_nb | ( | void | ) |
Number of song file present in current directory played or the number of file present in playlist played.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_nav_next | ( | void | ) |
Go to next file to play.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_nav_playfile | ( | void | ) |
Start the play of current file selected in File System navigation.
|
inlinestatic |
References CMD_DONE.
bool ai_audio_nav_previous | ( | void | ) |
Go to previous file to play.
|
inlinestatic |
References CMD_DONE.
Ai_repeat_mode ai_audio_nav_repeat_get | ( | void | ) |
Get repeat mode.
|
inlinestatic |
References AUDIO_REPEAT_OFF, and CMD_DONE.
void ai_audio_nav_repeat_set | ( | Ai_repeat_mode | repeat_mode | ) |
Set repeat mode.
repeat_mode | repeat mode to select (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL) |
|
inlinestatic |
References CMD_DONE.
bool ai_audio_nav_setpos | ( | uint16_t | u16_pos | ) |
Set audio navigation at a position.
u16_pos | position to set |
|
inlinestatic |
References CMD_DONE.
Ai_shuffle_mode ai_audio_nav_shuffle_get | ( | void | ) |
This function return the shuffle mode used.
|
inlinestatic |
References AUDIO_SHUFFLE_OFF, and CMD_DONE.
void ai_audio_nav_shuffle_set | ( | Ai_shuffle_mode | shuffle | ) |
This function selects the shuffle mode.
shuffle | shuffle mode to select (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL) |
|
inlinestatic |
References CMD_DONE.
void ai_command_abort | ( | void | ) |
Aborts the current command.
References CMD_ERROR, g_ai_cmd_execution_status, g_ai_status, and g_b_ai_cmd_received.
Referenced by com_task().
ai_device_status_t ai_get_device_status | ( | void | ) |
Tells the status of the device connected.
Here is the list of the SYNCHRONOUS functions.
Tells if a device is connected or not
Tells the status of the device connected.
Tells if a device is connected or not
References AI_DEVICE_STATUS_NOT_PRESENT, AI_GET_DEVICE_STATUS, and AI_PRIORITY_CALL.
Referenced by usb_device_get_state().
|
inlinestatic |
References AI_DEVICE_STATUS_NOT_PRESENT, and CMD_DONE.
uint16_t ai_get_product_id | ( | void | ) |
Return the product identifier.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_get_serial_number | ( | char ** | sz_sn | ) |
Return the serial number of the connected device.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_get_vendor_id | ( | void | ) |
Return the vendor identifier.
|
inlinestatic |
References CMD_DONE.
void ai_init | ( | void | ) |
Initialize the Audio Interface.
filter_file | list of the files that will be filtered in the disk navigator. |
filter_songfile | list of the audio files that will be filtered in the audio navigator. |
filter_file | list of the playlist files that will be filtered in the audio navigator. |
Initialize the Audio Interface.
References AI_ASYNC_STACK_NB_ELEMENTS, ai_default_fct_set, AI_HID_CLASS, AI_NONE, AI_SD_MMC, ai_sd_mmc_fct_set, AI_USB_MS, ai_usb_ms_fct_set, g_ai_status, g_b_ai_cmd_received, and ai_fct_set::init.
Referenced by main().
|
inlinestatic |
bool ai_is_hid_class | ( | void | ) |
Returns true if the application is using hid class; false otherwise.
References AI_HID_CLASS.
Referenced by draw_device_type().
bool ai_is_none | ( | void | ) |
bool ai_is_sd_mmc | ( | void | ) |
Returns true if the application is using sd/mmc card support; false otherwise.
References AI_SD_MMC.
Referenced by draw_device_type().
bool ai_is_usb_ms | ( | void | ) |
Returns true if the current device is a USB mass storage device; false otherwise.
References AI_USB_MS.
Referenced by draw_device_type().
bool ai_nav_dir_cd | ( | void | ) |
Enters in the current directory selected in file list filtered.
@return false in case of error, see global value "fs_g_status" for more detail @return true otherwise
//! After this routine the file list change and contains the files of new current directory, //! also no file is selected //!
|
inlinestatic |
References CMD_DONE.
bool ai_nav_dir_gotoparent | ( | void | ) |
Goes to the parent directory of current directory corresponding at file list filtered.
@return false in case of error, see global value "fs_g_status" for more detail @return true otherwise
//! After, the file list change and contains the files of parent directory, //! also the file selected is the old directory. //! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_dir_name | ( | char ** | string | ) |
Return the file name of current parent directory.
string | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_dir_nb | ( | void | ) |
Computes the number of directories in the filtered list.
@return number of directories present in list filtered
//! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
bool ai_nav_dir_root | ( | void | ) |
Initializes the file list filtered on the root directory.
|
inlinestatic |
References CMD_DONE.
uint64_t ai_nav_drive_free_space | ( | void | ) |
Get the free space in bytes available on the device.
|
inlinestatic |
References CMD_DONE.
uint8_t ai_nav_drive_get | ( | void | ) |
Returns the number of the selected drive.
|
inlinestatic |
References CMD_DONE.
bool ai_nav_drive_mount | ( | void | ) |
Mounts the current drive selected.
@return false in case of error, see global value "fs_g_status" for more detail @return true otherwise
//! If the option FS_MULTI_PARTITION is disable //! then the mount routine select the first partition supported by file system. <br> //! After mount, the file list corresponding at the files and directories present in ROOT directory //!
Referenced by idle_task().
|
inlinestatic |
References CMD_DONE.
uint8_t ai_nav_drive_nb | ( | void | ) |
Return the number of drives.
Referenced by idle_task().
|
inlinestatic |
References CMD_DONE.
bool ai_nav_drive_set | ( | uint8_t | u8_number | ) |
Selects the drive in current navigator but do not mount it.
u8_number | device number (0 to nav_drive_nb()-1 ) |
Referenced by idle_task().
|
inlinestatic |
References CMD_DONE.
uint64_t ai_nav_drive_total_space | ( | void | ) |
Get the total space in bytes available on the device.
|
inlinestatic |
References CMD_DONE.
bool ai_nav_file_goto | ( | uint32_t | u32_newpos | ) |
Goes to a position in the filtered list.
@param u16_newpos new position to select in file list, 0 is the first position @return false in case of error, see global value "fs_g_status" for more detail @return true otherwise
//! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_info_album | ( | char ** | sz_album | ) |
Return album of current file selected.
sz_album | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_info_artist | ( | char ** | sz_artist | ) |
Return artist of current file selected.
sz_artist | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint32_t ai_nav_file_info_duration | ( | void | ) |
Return duration of current file selected.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_info_genre | ( | char ** | sz_genre | ) |
Return genre of current file selected.
sz_genre | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
void* ai_nav_file_info_image | ( | ai_image_size_t * | size | ) |
Returns a pointer and image information of the embedded image of the selected track.
size | The desire width and height of the decoded image. |
size | The actual width and height of the decoded image. |
References ai_async_cmd_out_u32(), ai_async_cmd_task(), ai_async_nav_file_info_image(), AI_SYNC_TASK_CALL_BACK, and is_ai_async_cmd_finished().
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_info_title | ( | char ** | sz_title | ) |
Return title of current file selected.
sz_title | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint32_t ai_nav_file_info_track | ( | void | ) |
Return track of current file selected.
|
inlinestatic |
References CMD_DONE.
uint32_t ai_nav_file_info_type | ( | void | ) |
Return the type of the song for the selected file.
|
inlinestatic |
References CMD_DONE.
St_ai_info_version ai_nav_file_info_version | ( | void | ) |
Return the version of the metadata storage method used for the selected file.
|
inlinestatic |
References St_ai_info_version::all, and CMD_DONE.
uint16_t ai_nav_file_info_year | ( | void | ) |
Return year of current file selected.
|
inlinestatic |
References CMD_DONE.
bool ai_nav_file_isdir | ( | void | ) |
Returns the type of the selected file.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_name | ( | char ** | string | ) |
Return the file name of current file selected.
string | pointer to store the string allocated by the routine |
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_nb | ( | void | ) |
Computes the number of files in the filtered list.
@return number of files present in list filtered
//! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
bool ai_nav_file_next | ( | void | ) |
Goes to the next file of the filtered list.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_file_pos | ( | void | ) |
Returns the position of selected file in list filtered.
@return position of selected file in current directory, 0 is the first position @return FS_NO_SEL, in case of no file selected
//! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
bool ai_nav_file_previous | ( | void | ) |
Goes to the previous file of the filtered list.
|
inlinestatic |
References CMD_DONE.
bool ai_nav_getplayfile | ( | void | ) |
Position the File system navigation on the file play.
|
inlinestatic |
References CMD_DONE.
uint16_t ai_nav_playlist_nb | ( | void | ) |
Computes the number of playlist in the filtered list.
@return number of playlists present in list filtered
//! "Filter list" is a list of files filtered and directories present in current directory //!
|
inlinestatic |
References CMD_DONE.
|
inlinestatic |
References CMD_DONE.
void ai_task | ( | void | ) |
Task for the internal behaviors of the Audio Interface.
References AI_NONE, AI_PRIORITY_CALL, and AI_TASK_SELECT_FCT_SET.
Referenced by main().
bool is_ai_async_cmd_finished | ( | void | ) |
Tests if the current asynchronous routine is finished.
References g_b_ai_cmd_received.
Referenced by ai_audio_context_save(), ai_audio_nav_file_info_image(), ai_nav_file_info_image(), codec_wav_task(), and com_task().
uint8_t g_retry_cnt |
Number of retries before aborting the command.
Referenced by ai_async_cmd_put().