Atmel Software Framework

audio_interface.h File Reference

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...
 

Enumerations

enum  ai_async_status_t {
  CMD_DONE = 0,
  CMD_EXECUTING = 1,
  CMD_ERROR = 2
}
 Structure Context which includes all information about audio. More...
 
enum  ai_device_status_t {
  AI_DEVICE_STATUS_NOT_PRESENT = 0,
  AI_DEVICE_STATUS_PRESENT,
  AI_DEVICE_STATUS_NOT_SUPPORTED,
  AI_DEVICE_STATUS_ERROR,
  AI_DEVICE_STATUS_CONNECTED
}
 
Internal ID commands used by ai_async_cmd_put()
enum  cmd_ai_id_t {
  CMD_AI_GET_DEVICE_STATUS,
  CMD_AI_GET_PRODUCT_ID,
  CMD_AI_GET_VENDOR_ID,
  CMD_AI_GET_SERIAL_NUMBER,
  CMD_AI_NAV_DRIVE_NB,
  CMD_AI_NAV_DRIVE_SET,
  CMD_AI_NAV_DRIVE_GET,
  CMD_AI_NAV_DRIVE_MOUNT,
  CMD_AI_NAV_DRIVE_TOTAL_SPACE,
  CMD_AI_NAV_DRIVE_FREE_SPACE,
  CMD_AI_NAV_DIR_ROOT,
  CMD_AI_NAV_DIR_CD,
  CMD_AI_NAV_DIR_GOTOPARENT,
  CMD_AI_NAV_DIR_NAME,
  CMD_AI_NAV_FILE_NAME,
  CMD_AI_NAV_FILE_ISDIR,
  CMD_AI_NAV_FILE_NEXT,
  CMD_AI_NAV_FILE_PREVIOUS,
  CMD_AI_NAV_FILE_GOTO,
  CMD_AI_NAV_FILE_POS,
  CMD_AI_NAV_FILE_NB,
  CMD_AI_NAV_DIR_NB,
  CMD_AI_NAV_PLAYLIST_NB,
  CMD_AI_NAV_GETPLAYFILE,
  CMD_AI_NAV_INFO_TYPE,
  CMD_AI_NAV_INFO_VERSION,
  CMD_AI_NAV_INFO_TITLE,
  CMD_AI_NAV_INFO_ARTIST,
  CMD_AI_NAV_INFO_ALBUM,
  CMD_AI_NAV_INFO_YEAR,
  CMD_AI_NAV_INFO_TRACK,
  CMD_AI_NAV_INFO_GENRE,
  CMD_AI_NAV_INFO_DURATION,
  CMD_AI_NAV_INFO_IMAGE,
  CMD_AI_AUDIO_CONTEXT_SAVE,
  CMD_AI_AUDIO_CONTEXT_RESTORE,
  CMD_AI_AUDIO_NAV_PLAYFILE,
  CMD_AI_AUDIO_NAV_NEXT,
  CMD_AI_AUDIO_NAV_PREV,
  CMD_AI_AUDIO_NAV_EOF_OCCUR,
  CMD_AI_AUDIO_NAV_NB,
  CMD_AI_AUDIO_NAV_GETPOS,
  CMD_AI_AUDIO_NAV_SETPOS,
  CMD_AI_AUDIO_NAV_GETNAME,
  CMD_AI_AUDIO_NAV_REPEAT_GET,
  CMD_AI_AUDIO_NAV_REPEAT_SET,
  CMD_AI_AUDIO_NAV_EXPMODE_GET,
  CMD_AI_AUDIO_NAV_EXPMODE_SET,
  CMD_AI_AUDIO_NAV_SHUFFLE_GET,
  CMD_AI_AUDIO_NAV_SHUFFLE_SET,
  CMD_AI_AUDIO_NAV_INFO_TYPE,
  CMD_AI_AUDIO_NAV_INFO_VERSION,
  CMD_AI_AUDIO_NAV_INFO_TITLE,
  CMD_AI_AUDIO_NAV_INFO_ARTIST,
  CMD_AI_AUDIO_NAV_INFO_ALBUM,
  CMD_AI_AUDIO_NAV_INFO_YEAR,
  CMD_AI_AUDIO_NAV_INFO_TRACK,
  CMD_AI_AUDIO_NAV_INFO_GENRE,
  CMD_AI_AUDIO_NAV_INFO_DURATION,
  CMD_AI_AUDIO_NAV_INFO_IMAGE,
  CMD_AI_AUDIO_CTRL_STOP,
  CMD_AI_AUDIO_CTRL_RESUME,
  CMD_AI_AUDIO_CTRL_TIME,
  CMD_AI_AUDIO_CTRL_STATUS,
  CMD_AI_AUDIO_CTRL_FFW,
  CMD_AI_AUDIO_CTRL_FRW,
  CMD_AI_AUDIO_CTRL_PAUSE,
  CMD_AI_AUDIO_CTRL_START_FFW,
  CMD_AI_AUDIO_CTRL_START_FRW,
  CMD_AI_AUDIO_CTRL_STOP_FFW_FRW,
  CMD_AI_SPECIFIC_ID_START
}
 

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
#define AUDIO_EXPLORER_MODE_DIRSUB   3
#define AUDIO_EXPLORER_MODE_DISK   1
#define AUDIO_EXPLORER_MODE_DISKS   0
#define AUDIO_REPEAT_ALL   3
#define AUDIO_REPEAT_FOLDER   2
#define AUDIO_REPEAT_OFF   0
#define AUDIO_REPEAT_TRACK   1
#define AUDIO_SHUFFLE_ALL   2
#define AUDIO_TYPE_MP1   1
#define AUDIO_TYPE_MP2   2
#define AUDIO_TYPE_MP3   3
#define AUDIO_TYPE_UNKNOWN   0
#define AUDIO_TYPE_WAV   5
#define PLAYER_FLAG_NORMAL   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.

Structure Context which includes all information about audio.

Enumerator
CMD_DONE 
CMD_EXECUTING 
CMD_ERROR 
Enumerator
AI_DEVICE_STATUS_NOT_PRESENT 
AI_DEVICE_STATUS_PRESENT 
AI_DEVICE_STATUS_NOT_SUPPORTED 
AI_DEVICE_STATUS_ERROR 
AI_DEVICE_STATUS_CONNECTED 
Enumerator
CMD_AI_GET_DEVICE_STATUS 
CMD_AI_GET_PRODUCT_ID 
CMD_AI_GET_VENDOR_ID 
CMD_AI_GET_SERIAL_NUMBER 
CMD_AI_NAV_DRIVE_NB 
CMD_AI_NAV_DRIVE_SET 
CMD_AI_NAV_DRIVE_GET 
CMD_AI_NAV_DRIVE_MOUNT 
CMD_AI_NAV_DRIVE_TOTAL_SPACE 
CMD_AI_NAV_DRIVE_FREE_SPACE 
CMD_AI_NAV_DIR_ROOT 
CMD_AI_NAV_DIR_CD 
CMD_AI_NAV_DIR_GOTOPARENT 
CMD_AI_NAV_DIR_NAME 
CMD_AI_NAV_FILE_NAME 
CMD_AI_NAV_FILE_ISDIR 
CMD_AI_NAV_FILE_NEXT 
CMD_AI_NAV_FILE_PREVIOUS 
CMD_AI_NAV_FILE_GOTO 
CMD_AI_NAV_FILE_POS 
CMD_AI_NAV_FILE_NB 
CMD_AI_NAV_DIR_NB 
CMD_AI_NAV_PLAYLIST_NB 
CMD_AI_NAV_GETPLAYFILE 
CMD_AI_NAV_INFO_TYPE 
CMD_AI_NAV_INFO_VERSION 
CMD_AI_NAV_INFO_TITLE 
CMD_AI_NAV_INFO_ARTIST 
CMD_AI_NAV_INFO_ALBUM 
CMD_AI_NAV_INFO_YEAR 
CMD_AI_NAV_INFO_TRACK 
CMD_AI_NAV_INFO_GENRE 
CMD_AI_NAV_INFO_DURATION 
CMD_AI_NAV_INFO_IMAGE 
CMD_AI_AUDIO_CONTEXT_SAVE 
CMD_AI_AUDIO_CONTEXT_RESTORE 
CMD_AI_AUDIO_NAV_PLAYFILE 
CMD_AI_AUDIO_NAV_NEXT 
CMD_AI_AUDIO_NAV_PREV 
CMD_AI_AUDIO_NAV_EOF_OCCUR 
CMD_AI_AUDIO_NAV_NB 
CMD_AI_AUDIO_NAV_GETPOS 
CMD_AI_AUDIO_NAV_SETPOS 
CMD_AI_AUDIO_NAV_GETNAME 
CMD_AI_AUDIO_NAV_REPEAT_GET 
CMD_AI_AUDIO_NAV_REPEAT_SET 
CMD_AI_AUDIO_NAV_EXPMODE_GET 
CMD_AI_AUDIO_NAV_EXPMODE_SET 
CMD_AI_AUDIO_NAV_SHUFFLE_GET 
CMD_AI_AUDIO_NAV_SHUFFLE_SET 
CMD_AI_AUDIO_NAV_INFO_TYPE 
CMD_AI_AUDIO_NAV_INFO_VERSION 
CMD_AI_AUDIO_NAV_INFO_TITLE 
CMD_AI_AUDIO_NAV_INFO_ARTIST 
CMD_AI_AUDIO_NAV_INFO_ALBUM 
CMD_AI_AUDIO_NAV_INFO_YEAR 
CMD_AI_AUDIO_NAV_INFO_TRACK 
CMD_AI_AUDIO_NAV_INFO_GENRE 
CMD_AI_AUDIO_NAV_INFO_DURATION 
CMD_AI_AUDIO_NAV_INFO_IMAGE 
CMD_AI_AUDIO_CTRL_STOP 
CMD_AI_AUDIO_CTRL_RESUME 
CMD_AI_AUDIO_CTRL_TIME 
CMD_AI_AUDIO_CTRL_STATUS 
CMD_AI_AUDIO_CTRL_FFW 
CMD_AI_AUDIO_CTRL_FRW 
CMD_AI_AUDIO_CTRL_PAUSE 
CMD_AI_AUDIO_CTRL_START_FFW 
CMD_AI_AUDIO_CTRL_START_FRW 
CMD_AI_AUDIO_CTRL_STOP_FFW_FRW 
CMD_AI_SPECIFIC_ID_START 

static __always_inline bool ai_async_audio_context_restore ( void *  ctx)
static

Restores an audio context (possibly restart play).

Note
May be interesting after a power ON.
Parameters
ctxstructure with all information about context to restore
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CONTEXT_RESTORE.

static __always_inline bool ai_async_audio_context_save ( void  )
static

Gives the full audio context (player state, play time, repeat, shuffle, file played, explorer mode )

Note
May be interesting before a power OFF.
Returns
cmd_out_SizeArrayU8 - size of St_audio_ctx structure
cmd_out_PtrArrayU8 - pointer on St_audio_ctx structure
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CONTEXT_SAVE.

Referenced by ai_audio_context_save().

static __always_inline bool ai_async_audio_ctrl_ffw ( uint32_t  u32_duration)
static

Fast Forward.

Parameters
u32_durationduration of FFW in seconds
Returns
false in case of error

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_FFW.

static __always_inline bool ai_async_audio_ctrl_frw ( uint32_t  u32_duration)
static

Fast Rewind.

Parameters
u32_durationduration of FFW in seconds
Returns
false in case of error

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_FRW.

static __always_inline bool ai_async_audio_ctrl_pause ( void  )
static

Pause the current audio file.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_PAUSE.

Referenced by playback_task().

static __always_inline bool ai_async_audio_ctrl_resume ( void  )
static

Plays the current audio file.

Note
use it after a stop or a pause.
Parameters
u32_time_starttime at start the play
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_RESUME.

Referenced by command_task(), playback_task(), and track_changed_task().

static __always_inline bool ai_async_audio_ctrl_start_ffw ( void  )
static

Start Fast Forward.

Returns
false in case of error

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_START_FFW.

Referenced by playback_task().

static __always_inline bool ai_async_audio_ctrl_start_frw ( void  )
static

Start Fast Rewind.

Returns
false in case of error

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_START_FRW.

Referenced by playback_task().

static __always_inline bool ai_async_audio_ctrl_status ( void  )
static

Returns the current status of audio player.

Returns
cmd_out_u32 - field of bits (PLAYER_STATUS_PLAY)
cmd_out_status - false in case of error, true is success

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 __always_inline bool ai_async_audio_ctrl_stop ( void  )
static

Stops the player.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_STOP.

static __always_inline bool ai_async_audio_ctrl_stop_ffw_frw ( void  )
static

Stop FastForward/FastRewind.

Returns
false in case of error

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_STOP_FFW_FRW.

Referenced by playback_task().

static __always_inline bool ai_async_audio_ctrl_time ( void  )
static

Returns the current played time (ms).

Returns
cmd_out_u32 - current time
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_CTRL_TIME.

Referenced by playback_task().

static __always_inline bool ai_async_audio_nav_eof_occur ( void  )
static

Start next file.

Note
Call this routine after the end of song
Returns
cmd_out_status - false in case of error, true is success

TODO: TBD

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EOF_OCCUR.

static __always_inline bool ai_async_audio_nav_expmode_get ( void  )
static

Returns the used mode.

Returns
cmd_out_u32 - mode used (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB)
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EXPMODE_GET.

static __always_inline bool ai_async_audio_nav_expmode_set ( Ai_explorer_mode  exp_mode)
static

Selects the loop mode.

Note
It reinit the folder level at the current position
Parameters
exp_modemode to select (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB)
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_EXPMODE_SET.

static __always_inline bool ai_async_audio_nav_file_info_album ( void  )
static

Returns the album name of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_ALBUM.

static __always_inline bool ai_async_audio_nav_file_info_artist ( void  )
static

Returns the artist's name of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_ARTIST.

Referenced by track_changed_task().

static __always_inline bool ai_async_audio_nav_file_info_duration ( void  )
static

Returns the track duration of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_DURATION.

Referenced by track_changed_task().

static __always_inline bool ai_async_audio_nav_file_info_genre ( void  )
static

Returns the genre of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_GENRE.

static __always_inline bool ai_async_audio_nav_file_info_image ( ai_image_size_t size)
static

Returns a pointer and image information of the embedded image of the selected track.

Returns
size - The real dimensions of the image.
ai_async_cmd_out_u32 - pointer on the image data.
cmd_out_status - false in case of error, true is success

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 __always_inline bool ai_async_audio_nav_file_info_title ( void  )
static

Returns title of current song file selected.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TITLE.

Referenced by track_changed_task().

static __always_inline bool ai_async_audio_nav_file_info_track ( void  )
static

Returns the track info of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TRACK.

static __always_inline bool ai_async_audio_nav_file_info_type ( void  )
static

Return the file extension of the current file selected.

Returns
cmd_out_u32 - type of the current file selected
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_TYPE.

static __always_inline bool ai_async_audio_nav_file_info_version ( void  )
static

Return the version of the metadata storage method used for the selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_VERSION.

static __always_inline bool ai_async_audio_nav_file_info_year ( void  )
static

Returns the year of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_INFO_YEAR.

static __always_inline bool ai_async_audio_nav_getname ( void  )
static

Gets the name of current played file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_GETNAME.

Referenced by track_changed_task().

static __always_inline bool ai_async_audio_nav_getpos ( void  )
static

Gives the position of play file.

Returns
cmd_out_u32 - 1 to nb file in directory or play list
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_GETPOS.

static __always_inline bool ai_async_audio_nav_nb ( void  )
static

Number of song file present in current played directory or the number of file present in played playlist.

Returns
cmd_out_u32 - nb file in directory or play list
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_NB.

static __always_inline bool ai_async_audio_nav_next ( void  )
static

Goes to the next file to play.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_NEXT.

Referenced by playback_task().

static __always_inline bool ai_async_audio_nav_playfile ( void  )
static

Starts the play of current file selected in File System navigation.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_PLAYFILE.

Referenced by navigation_task(), and playback_task().

static __always_inline bool ai_async_audio_nav_previous ( void  )
static

Goes to the previous file to play.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_PREV.

Referenced by playback_task().

static __always_inline bool ai_async_audio_nav_repeat_get ( void  )
static

Gets the repeat mode.

Returns
cmd_out_u32 - repeat mode used (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL)
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_REPEAT_GET.

Referenced by config_task().

static __always_inline bool ai_async_audio_nav_repeat_set ( Ai_repeat_mode  repeat_mode)
static

Sets the repeat mode.

Parameters
repeat_moderepeat mode to select (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL)
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_REPEAT_SET.

Referenced by config_task().

static __always_inline bool ai_async_audio_nav_setpos ( uint16_t  u16_pos)
static

Change the position of play file.

Parameters
u16_posposition to set
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_SETPOS.

static __always_inline bool ai_async_audio_nav_shuffle_get ( void  )
static

Gets the shuffle mode.

Returns
cmd_out_u32 - shuffle mode used (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL)
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_AUDIO_NAV_SHUFFLE_GET.

Referenced by config_task().

static __always_inline bool ai_async_audio_nav_shuffle_set ( Ai_shuffle_mode  shuffle)
static

Sets the shuffle mode.

Parameters
shuffleshuffle mode to select (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL)
Returns
cmd_out_status - false in case of error, true is success

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, g_ai_u16_arg_size, and NULL.

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.

Note
this value is valid only if is_ai_async_cmd_finished() return true, and ai_async_cmd_out_SizeArrayU8() return != 0
Returns
pointer on extra result

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.

Note
this value is valid only if is_ai_async_cmd_finished() return true
Returns
0 = no extra value, else get pointer on extra result with ai_async_cmd_out_PtrArrayU8() routine

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.

Note
this value is valid only if is_ai_async_cmd_finished() returns true
Returns
status of command (which value depends on command)

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.

Note
this value is valid only if is_ai_async_cmd_finished() returns true.
Returns
result of command (which value depends on command)

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.

Note
this value is valid only if is_ai_async_cmd_finished() returns true.
Returns
result of command (which value depends on command)

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.

Note
you can use the ai_async_cmd_put() routine or ai_async_X() MACRO to send a asynchronous command

This routine may be use to send directly a command values from a communication port to audio interface.

Note
you can use the ai_async_cmd_put() routine or ai_async_X() routines to send an asynchronous command

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.

Note
Call this one when the application have a free time

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, NULL, and St_ai_info_version::revision.

Referenced by ai_audio_context_save(), ai_audio_nav_file_info_image(), ai_nav_file_info_image(), codec_mp3_task(), codec_wav_task(), and com_task().

bool ai_async_context_pop ( ai_async_context_t ctx)

Pop a context from the stack.

Parameters
ctxA pointer on an empty context structure to store the new context.
Returns
true if the command succeed,
false otherwise.

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.

Parameters
ctxThe new context to push.
Returns
true if the command succeed,
false otherwise.

Referenced by ai_usb_ms_audio_nav_mov().

static __always_inline bool ai_async_get_product_id ( void  )
static

Return the device identifier.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_GET_PRODUCT_ID.

static __always_inline bool ai_async_get_serial_number ( void  )
static

Return the serial number of the connected device.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_GET_SERIAL_NUMBER.

static __always_inline bool ai_async_get_vendor_id ( void  )
static

Return the vendor identifier.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_GET_VENDOR_ID.

static __always_inline bool ai_async_is_device_connected ( void  )
static

Here is the list of the ASYNCHRONOUS functions.

Tells if a device is connected or not

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_GET_DEVICE_STATUS.

static __always_inline bool ai_async_nav_dir_cd ( void  )
static

Enters in the current directory selected in file list filtered.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DIR_CD.

Referenced by navigation_task().

static __always_inline bool ai_async_nav_dir_gotoparent ( void  )
static

Goes to the parent directory of current directory corresponding at file list filtered.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DIR_GOTOPARENT.

Referenced by navigation_task().

static __always_inline bool ai_async_nav_dir_name ( void  )
static

Returns the file name of current parent directory.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DIR_NAME.

static __always_inline bool ai_async_nav_dir_nb ( void  )
static

Computes the number of directories in the filtered list.

Returns
cmd_out_u32 - number of file and directory present in list filtered
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DIR_NB.

static __always_inline bool ai_async_nav_dir_root ( void  )
static

Initializes the file list filtered on the root directory.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DIR_ROOT.

static __always_inline bool ai_async_nav_drive_free_space ( void  )
static

Get the free space in bytes available on the device.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_FREE_SPACE.

static __always_inline bool ai_async_nav_drive_get ( void  )
static

Returns the number of the selected drive.

Returns
cmd_out_u32 - 0 to nav_drive_nb()-1
cmd_out_u32 - 0xFF in case of no drive selected
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_GET.

static __always_inline bool ai_async_nav_drive_mount ( void  )
static

Mounts the current drive selected.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_MOUNT.

static __always_inline bool ai_async_nav_drive_nb ( void  )
static

Return the number of drives.

Returns
cmd_out_u32 - number of drives, 0 = NO DEVICE AVAILABLE
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_NB.

static __always_inline bool ai_async_nav_drive_set ( uint8_t  u8_number)
static

Selects the drive in current navigator but do not mount it.

Parameters
u8_numberdevice number (0 to nav_drive_nb()-1 )
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_SET.

static __always_inline bool ai_async_nav_drive_total_space ( void  )
static

Get the total space in bytes available on the device.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_DRIVE_TOTAL_SPACE.

static __always_inline bool ai_async_nav_file_goto ( uint32_t  u32_newpos)
static

Goes to a position in the filtered list.

Parameters
u16_newposnew position to select in file list, 0 is the first position
Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_GOTO.

Referenced by navigation_task().

static __always_inline bool ai_async_nav_file_info_album ( void  )
static

Returns the album of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_ALBUM.

static __always_inline bool ai_async_nav_file_info_artist ( void  )
static

Returns the artist of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_ARTIST.

static __always_inline bool ai_async_nav_file_info_duration ( void  )
static

Returns the track duration of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_DURATION.

static __always_inline bool ai_async_nav_file_info_genre ( void  )
static

Return the genre of the current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_GENRE.

static __always_inline bool ai_async_nav_file_info_image ( ai_image_size_t size)
static

Returns a pointer and image information of the embedded image of the selected track.

Returns
size - The real dimensions of the image.
ai_async_cmd_out_u32 - pointer on the image data.
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_IMAGE.

Referenced by ai_nav_file_info_image().

static __always_inline bool ai_async_nav_file_info_title ( void  )
static

Returns the title of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TITLE.

static __always_inline bool ai_async_nav_file_info_track ( void  )
static

Returns the track name of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TRACK.

static __always_inline bool ai_async_nav_file_info_type ( void  )
static

Return the file extension of the current file selected.

Returns
cmd_out_u32 - type of the current file selected
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_TYPE.

static __always_inline bool ai_async_nav_file_info_version ( void  )
static

Return the version of the metadata storage method used for the selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_VERSION.

static __always_inline bool ai_async_nav_file_info_year ( void  )
static

Returns the year of current selected file.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_INFO_YEAR.

static __always_inline bool ai_async_nav_file_isdir ( void  )
static

Returns the type of the selected file.

Returns
cmd_out_u32 - true, it is a directory
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_ISDIR.

Referenced by navigation_task().

static __always_inline bool ai_async_nav_file_name ( void  )
static

Returns the file name of the current file selected.

Returns
cmd_out_SizeArrayU8 - number of character (unit 2B for UNICODE) allocated
cmd_out_PtrArrayU8 - pointer on string allocated by the routine
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NAME.

Referenced by navigation_task().

static __always_inline bool ai_async_nav_file_nb ( void  )
static

Computes the number of files in the filtered list.

Returns
cmd_out_u32 - number of file and directory present in list filtered
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NB.

static __always_inline bool ai_async_nav_file_next ( void  )
static

Goes to the next file of the filtered list.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_NEXT.

static __always_inline bool ai_async_nav_file_pos ( void  )
static

Returns the position of selected file in list filtered.

Returns
cmd_out_u32 - position of selected file in current directory, 0 is the first position
cmd_out_u32 - FS_NO_SEL, in case of no file selected
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_POS.

static __always_inline bool ai_async_nav_file_previous ( void  )
static

Goes to the previous file of the filtered list.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_FILE_PREVIOUS.

static __always_inline bool ai_async_nav_getplayfile ( void  )
static

Position the File system navigation on the file play.

Returns
cmd_out_status - false in case of error, true is success

References ai_async_cmd_put(), and CMD_AI_NAV_GETPLAYFILE.

static __always_inline bool ai_async_nav_playlist_nb ( void  )
static

Computes the number of playlist in the filtered list.

Returns
cmd_out_u32 - number of file and directory present in list filtered
cmd_out_status - false in case of error, true is success

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.

Parameters
cmd_ai_statusThe current command status to update

References AI_ASYNC_STACK_NB_ELEMENTS, CMD_DONE, CMD_ERROR, ctx, 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).

Note
May be interesting after a power ON.
Parameters
ctxstructure with all information about context to restore
Returns
false in case of error
static bool ai_audio_context_restore_null ( void *  c,
ai_async_status_t status 
)
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 )

Note
May be interesting before a power OFF.
Returns
ctx structure with all information about the current context

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, is_ai_async_cmd_finished(), and NULL.

static void* ai_audio_context_save_null ( uint8_t *  a,
uint16_t *  b,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE, and NULL.

bool ai_audio_ctrl_ffw ( uint32_t  u32_duration)

Fast Forward.

Parameters
u32_durationduration of FFW in seconds
Returns
false in case of error
static bool ai_audio_ctrl_ffw_null ( uint32_t  n,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

bool ai_audio_ctrl_frw ( uint32_t  u32_duration)

Fast Rewind.

Parameters
u32_durationduration of FRW in seconds
Returns
false in case of error
static bool ai_audio_ctrl_frw_null ( uint32_t  n,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

bool ai_audio_ctrl_pause ( void  )

Pause the current audio file.

Returns
false in case of error
static bool ai_audio_ctrl_pause_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_ctrl_resume ( void  )

Resume the play of the current audio file.

Note
use it after a stop or a pause
Parameters
u32_time_starttime at start the play
Returns
false in case of error

Referenced by codec_mp3_task(), and codec_wav_task().

static bool ai_audio_ctrl_resume_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_ctrl_start_ffw ( void  )

Start Fast Forward.

Returns
false in case of error
static bool ai_audio_ctrl_start_ffw_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_ctrl_start_frw ( void  )

Start Fast Rewind.

Returns
false in case of error
static bool ai_audio_ctrl_start_frw_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

Ai_player_flag_t ai_audio_ctrl_status ( void  )

Return the current status of player.

Returns
field of bits (PLAYER_STATUS_PLAY)
static Ai_player_flag_t ai_audio_ctrl_status_null ( ai_async_status_t status)
inlinestatic

References Ai_player_flag_t::all, and CMD_DONE.

bool ai_audio_ctrl_stop ( void  )

Stop the player.

Returns
true the player is stopped
bool ai_audio_ctrl_stop_ffw_frw ( void  )

Stop FastForward/FastRewind.

Returns
false in case of error
static bool ai_audio_ctrl_stop_ffw_frw_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

static bool ai_audio_ctrl_stop_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint32_t ai_audio_ctrl_time ( void  )

Return current time played.

Returns
current time
static uint32_t ai_audio_ctrl_time_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_nav_eof_occur ( void  )

Start next file.

Note
Call this routine after the end of song
Returns
false in case of error

Referenced by codec_mp3_task(), and codec_wav_task().

static bool ai_audio_nav_eof_occur_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

Ai_explorer_mode ai_audio_nav_expmode_get ( void  )

This function returns the mode used.

Returns
mode used (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB)
static Ai_explorer_mode ai_audio_nav_expmode_get_null ( ai_async_status_t status)
inlinestatic
void ai_audio_nav_expmode_set ( Ai_explorer_mode  exp_mode)

This function selects the loop mode.

Note
It reinit the folder level at the current position
Parameters
exp_modemode to select (AUDIO_EXPLORER_MODE_DISKS, AUDIO_EXPLORER_MODE_DISK, AUDIO_EXPLORER_MODE_DIRONLY, AUDIO_EXPLORER_MODE_DIRSUB)
static void ai_audio_nav_expmode_set_null ( Ai_explorer_mode  m,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_audio_nav_file_info_album ( char **  sz_album)

Return album of current song file selected.

Parameters
sz_albumpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_audio_nav_file_info_album_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_audio_nav_file_info_artist ( char **  sz_artist)

Return artist of current song file selected.

Parameters
sz_artistpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_audio_nav_file_info_artist_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint32_t ai_audio_nav_file_info_duration ( void  )

Return duration of current song file selected.

Returns
duration (ms)
static uint32_t ai_audio_nav_file_info_duration_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_audio_nav_file_info_genre ( char **  sz_genre)

Return genre of current song file selected.

Parameters
sz_genrepointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_audio_nav_file_info_genre_null ( char **  str,
ai_async_status_t status 
)
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.

Parameters
sizeThe desire width and height of the decoded image.
sizeThe actual width and height of the decoded image.
Returns
pointer on the image data. NULL in case of error.

References ai_async_audio_nav_file_info_image(), ai_async_cmd_out_u32(), ai_async_cmd_task(), AI_SYNC_TASK_CALL_BACK, is_ai_async_cmd_finished(), and NULL.

static void* ai_audio_nav_file_info_image_null ( ai_image_size_t img,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE, and NULL.

uint16_t ai_audio_nav_file_info_title ( char **  sz_title)

Return title of current song file selected.

Parameters
sz_titlepointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_audio_nav_file_info_title_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint32_t ai_audio_nav_file_info_track ( void  )

Return track of current song file selected.

Returns
track number
static uint32_t ai_audio_nav_file_info_track_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint32_t ai_audio_nav_file_info_type ( void  )

Return the type of the song for the selected file.

Returns
Type of file
static uint32_t ai_audio_nav_file_info_type_null ( ai_async_status_t status)
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.

Returns
Metadata version
static St_ai_info_version ai_audio_nav_file_info_version_null ( ai_async_status_t status)
inlinestatic
uint16_t ai_audio_nav_file_info_year ( void  )

Return year of current song file selected.

Returns
year
static uint16_t ai_audio_nav_file_info_year_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_audio_nav_getname ( char **  string)

Get name of current file played.

Parameters
stringbuffer to fill
Returns
size of string, if no 0 then you must free it
static uint16_t ai_audio_nav_getname_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_audio_nav_getpos ( void  )

Give the position of play file.

Returns
1 to nb file in directory or play list
static uint16_t ai_audio_nav_getpos_null ( ai_async_status_t status)
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.

Returns
nb file in directory or play list
static uint16_t ai_audio_nav_nb_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_nav_next ( void  )

Go to next file to play.

Returns
false in case of error
static bool ai_audio_nav_next_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_nav_playfile ( void  )

Start the play of current file selected in File System navigation.

Returns
false in case of error
static bool ai_audio_nav_playfile_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_audio_nav_previous ( void  )

Go to previous file to play.

Returns
false in case of error
static bool ai_audio_nav_previous_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

Ai_repeat_mode ai_audio_nav_repeat_get ( void  )

Get repeat mode.

Returns
repeat mode used (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL)
static Ai_repeat_mode ai_audio_nav_repeat_get_null ( ai_async_status_t status)
inlinestatic

References AUDIO_REPEAT_OFF, and CMD_DONE.

void ai_audio_nav_repeat_set ( Ai_repeat_mode  repeat_mode)

Set repeat mode.

Parameters
repeat_moderepeat mode to select (AUDIO_REPEAT_OFF, AUDIO_REPEAT_TRACK, AUDIO_REPEAT_FOLDER, AUDIO_REPEAT_ALL)
static void ai_audio_nav_repeat_set_null ( Ai_repeat_mode  m,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

bool ai_audio_nav_setpos ( uint16_t  u16_pos)

Set audio navigation at a position.

Parameters
u16_posposition to set
Returns
false in case of error
static bool ai_audio_nav_setpos_null ( uint16_t  n,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

Ai_shuffle_mode ai_audio_nav_shuffle_get ( void  )

This function return the shuffle mode used.

Returns
shuffle mode used (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL)
static Ai_shuffle_mode ai_audio_nav_shuffle_get_null ( ai_async_status_t status)
inlinestatic

References AUDIO_SHUFFLE_OFF, and CMD_DONE.

void ai_audio_nav_shuffle_set ( Ai_shuffle_mode  shuffle)

This function selects the shuffle mode.

Parameters
shuffleshuffle mode to select (AUDIO_SHUFFLE_OFF, AUDIO_SHUFFLE_FOLDER, AUDIO_SHUFFLE_ALL)
static void ai_audio_nav_shuffle_set_null ( Ai_shuffle_mode  m,
ai_async_status_t status 
)
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

Returns
true if a device is connected, false otherwise.

Tells the status of the device connected.

Tells if a device is connected or not

Returns
true if a device is connected, false otherwise.

References AI_DEVICE_STATUS_NOT_PRESENT, AI_GET_DEVICE_STATUS, and AI_PRIORITY_CALL.

Referenced by usb_device_get_state().

static ai_device_status_t ai_get_device_status_null ( ai_async_status_t status)
inlinestatic
uint16_t ai_get_product_id ( void  )

Return the product identifier.

Returns
product ID
static uint16_t ai_get_product_id_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_get_serial_number ( char **  sz_sn)

Return the serial number of the connected device.

Returns
serial number
static uint16_t ai_get_serial_number_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_get_vendor_id ( void  )

Return the vendor identifier.

Returns
vendor ID
static uint16_t ai_get_vendor_id_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

void ai_init ( void  )

Initialize the Audio Interface.

Parameters
filter_filelist of the files that will be filtered in the disk navigator.
filter_songfilelist of the audio files that will be filtered in the audio navigator.
filter_filelist 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_hid_class_fct_set, 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().

static void ai_init_null ( void  )
inlinestatic
bool ai_is_hid_class ( void  )

Returns true if the application is using hid class; false otherwise.

References AI_HID_CLASS.

bool ai_is_none ( void  )

Returns true if no devices are connected.

References AI_NONE.

Referenced by com_task().

bool ai_is_sd_mmc ( void  )

Returns true if the application is using sd/mmc card support; false otherwise.

References AI_SD_MMC.

bool ai_is_usb_ms ( void  )

Returns true if the current device is a USB mass storage device; false otherwise.

References AI_USB_MS.

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
//! 
static bool ai_nav_dir_cd_null ( ai_async_status_t status)
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
//! 
static bool ai_nav_dir_gotoparent_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_nav_dir_name ( char **  string)

Return the file name of current parent directory.

Parameters
stringpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_dir_name_null ( char **  str,
ai_async_status_t status 
)
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
//! 
static uint16_t ai_nav_dir_nb_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_dir_root ( void  )

Initializes the file list filtered on the root directory.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise
static bool ai_nav_dir_root_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint64_t ai_nav_drive_free_space ( void  )

Get the free space in bytes available on the device.

Returns
the free space available on the drive in bytes
static uint64_t ai_nav_drive_free_space_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint8_t ai_nav_drive_get ( void  )

Returns the number of the selected drive.

Returns
0 to nav_drive_nb()-1
0xFF in case of no drive selected
static uint8_t ai_nav_drive_get_null ( ai_async_status_t status)
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().

static bool ai_nav_drive_mount_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint8_t ai_nav_drive_nb ( void  )

Return the number of drives.

Returns
number of drives, 0 = NO DEVICE AVAILABLE

Referenced by idle_task().

static uint8_t ai_nav_drive_nb_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_drive_set ( uint8_t  u8_number)

Selects the drive in current navigator but do not mount it.

Parameters
u8_numberdevice number (0 to nav_drive_nb()-1 )
Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

Referenced by idle_task().

static bool ai_nav_drive_set_null ( uint8_t  n,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint64_t ai_nav_drive_total_space ( void  )

Get the total space in bytes available on the device.

Returns
the capacity of the drive in bytes
static uint64_t ai_nav_drive_total_space_null ( ai_async_status_t status)
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
//! 
static bool ai_nav_file_goto_null ( uint32_t  n,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_nav_file_info_album ( char **  sz_album)

Return album of current file selected.

Parameters
sz_albumpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_file_info_album_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint16_t ai_nav_file_info_artist ( char **  sz_artist)

Return artist of current file selected.

Parameters
sz_artistpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_file_info_artist_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint32_t ai_nav_file_info_duration ( void  )

Return duration of current file selected.

Returns
duration (ms)
static uint32_t ai_nav_file_info_duration_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_nav_file_info_genre ( char **  sz_genre)

Return genre of current file selected.

Parameters
sz_genrepointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_file_info_genre_null ( char **  str,
ai_async_status_t status 
)
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.

Parameters
sizeThe desire width and height of the decoded image.
sizeThe actual width and height of the decoded image.
Returns
pointer on the image data. NULL in case of error.

References ai_async_cmd_out_u32(), ai_async_cmd_task(), ai_async_nav_file_info_image(), AI_SYNC_TASK_CALL_BACK, is_ai_async_cmd_finished(), and NULL.

static void* ai_nav_file_info_image_null ( ai_image_size_t img,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE, and NULL.

uint16_t ai_nav_file_info_title ( char **  sz_title)

Return title of current file selected.

Parameters
sz_titlepointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_file_info_title_null ( char **  str,
ai_async_status_t status 
)
inlinestatic

References CMD_DONE.

uint32_t ai_nav_file_info_track ( void  )

Return track of current file selected.

Returns
track number
static uint32_t ai_nav_file_info_track_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint32_t ai_nav_file_info_type ( void  )

Return the type of the song for the selected file.

Returns
Type of file
static uint32_t ai_nav_file_info_type_null ( ai_async_status_t status)
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.

Returns
Metadata version
static St_ai_info_version ai_nav_file_info_version_null ( ai_async_status_t status)
inlinestatic
uint16_t ai_nav_file_info_year ( void  )

Return year of current file selected.

Returns
year
static uint16_t ai_nav_file_info_year_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_file_isdir ( void  )

Returns the type of the selected file.

Returns
true, it is a directory
false, in other case
static bool ai_nav_file_isdir_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

uint16_t ai_nav_file_name ( char **  string)

Return the file name of current file selected.

Parameters
stringpointer to store the string allocated by the routine
Returns
number of character (unit 2B for UNICODE) allocated
static uint16_t ai_nav_file_name_null ( char **  str,
ai_async_status_t status 
)
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
//! 
static uint16_t ai_nav_file_nb_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_file_next ( void  )

Goes to the next file of the filtered list.

Returns
cmd_out_status - false in case of error, true is success
static bool ai_nav_file_next_null ( ai_async_status_t status)
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
//! 
static uint32_t ai_nav_file_pos_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_file_previous ( void  )

Goes to the previous file of the filtered list.

Returns
cmd_out_status - false in case of error, true is success
static bool ai_nav_file_previous_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

bool ai_nav_getplayfile ( void  )

Position the File system navigation on the file play.

Returns
false in case of error
static bool ai_nav_getplayfile_null ( ai_async_status_t status)
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
//! 
static uint16_t ai_nav_playlist_nb_null ( ai_async_status_t status)
inlinestatic

References CMD_DONE.

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 
)
inlinestatic

References CMD_DONE.

void ai_task ( void  )

Task for the internal behaviors of the Audio Interface.

References AI_NONE, AI_PRIORITY_CALL, AI_TASK_SELECT_FCT_SET, and status.

Referenced by main().

bool is_ai_async_cmd_finished ( void  )

Tests if the current asynchronous routine is finished.

Returns
true when the current asynchronous command is finished, false when the asynchronous command is still running.

References g_b_ai_cmd_received.

Referenced by ai_audio_context_save(), ai_audio_nav_file_info_image(), ai_nav_file_info_image(), codec_mp3_task(), codec_wav_task(), and com_task().

uint8_t g_retry_cnt

Number of retries before aborting the command.

Referenced by ai_async_cmd_put().