ASF docs  3.1.3
Some important library documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
nav_automatic.h File Reference
#include "fs_com.h"
#include "fat.h"
#include "navigation.h"
#include "play_list.h"
+ Include dependency graph for nav_automatic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  Navauto_mov_bitfield_status
struct  Navauto_mov_state
 Structure to store the status from function navauto_mov() More...
struct  Navauto_mov_bitfield_status.__unnamed__

Macros

Definition of the directory limitations of the file list
#define NAVAUTO_MODE_DISKS   0
#define NAVAUTO_MODE_DISK   1
#define NAVAUTO_MODE_DIRONLY   2
#define NAVAUTO_MODE_DIRSUB   3
#define NAVAUTO_MODE_NB   4
Definition of the random states
#define NAVAUTO_RAND_OFF   0
#define NAVAUTO_RAND_ON   1
Status list of function navauto_mov()
#define NAVAUTO_MOV_OK   0
#define NAVAUTO_MOV_OK_LOOP   1
#define NAVAUTO_MOV_EMPTY   2
#define NAVAUTO_MOV_DISKNOPRESENT   3
#define NAVAUTO_MOV_DISKERROR   4

Typedefs

typedef uint8_t Navauto_mode
 Structure to store the directory limitation of the file list.
typedef uint8_t Navauto_rand
 Structure to store the random state.

Enumerations

enum  navauto_mov_options_t { NAVAUTO_MOV_OPTS_NONE = 0, NAVAUTO_MOV_OPTS_STAY_CURRENT_DIR = 1 }

Functions

Navauto_mode navauto_getmode (void)
 This function returns the directory limitation of the file list.
bool navauto_setmode (Navauto_mode exp_mode)
 This function sets the directory limitation of the file list.
Navauto_rand navauto_getrand (void)
 This function returns the random state used.
void navauto_setrand (Navauto_rand rand)
 This function changes the random state.
void navauto_init (const FS_STRING sz_filterext)
 This function initializes the file extension filter used to create the file list.
bool navauto_open (bool b_playlist, uint16_t pos)
 This function opens a file list at the current position in navigator.
uint16_t navauto_close (void)
 This function closes the file list.
uint16_t navauto_getnb (void)
 This function returns the file list size.
uint16_t navauto_getpos (void)
 This function returns the current position in the file list.
bool navauto_setpos (uint16_t u16_pos)
 This function selects a new position in fiel list.
Navauto_mov_state navauto_mov (bool b_direction, navauto_mov_options_t options)
 This function jumps to the next or previous file in file list.

Data Structure Documentation

union Navauto_mov_bitfield_status

Definition at line 82 of file nav_automatic.h.

Data Fields
struct Navauto_mov_bitfield_status __unnamed__
uint8_t all
struct Navauto_mov_state

Definition at line 93 of file nav_automatic.h.

+ Collaboration diagram for Navauto_mov_state:
Data Fields
Navauto_mov_bitfield_status bitfield
uint8_t status
struct Navauto_mov_bitfield_status.__unnamed__

Definition at line 85 of file nav_automatic.h.

Data Fields
uint8_t __pad0__: 7
uint8_t folder_change: 1

Macro Definition Documentation

#define NAVAUTO_MODE_DIRONLY   2

Definition at line 68 of file nav_automatic.h.

#define NAVAUTO_MODE_DIRSUB   3

Definition at line 69 of file nav_automatic.h.

#define NAVAUTO_MODE_DISK   1

Definition at line 67 of file nav_automatic.h.

#define NAVAUTO_MODE_DISKS   0

Definition at line 66 of file nav_automatic.h.

#define NAVAUTO_MODE_NB   4

Definition at line 70 of file nav_automatic.h.

#define NAVAUTO_MOV_DISKERROR   4

Definition at line 106 of file nav_automatic.h.

#define NAVAUTO_MOV_DISKNOPRESENT   3

Definition at line 105 of file nav_automatic.h.

#define NAVAUTO_MOV_EMPTY   2

Definition at line 104 of file nav_automatic.h.

#define NAVAUTO_MOV_OK   0

Definition at line 102 of file nav_automatic.h.

#define NAVAUTO_MOV_OK_LOOP   1

Definition at line 103 of file nav_automatic.h.

#define NAVAUTO_RAND_OFF   0

Definition at line 78 of file nav_automatic.h.

#define NAVAUTO_RAND_ON   1

Definition at line 79 of file nav_automatic.h.


Typedef Documentation

typedef uint8_t Navauto_mode

Definition at line 62 of file nav_automatic.h.

typedef uint8_t Navauto_rand

Definition at line 74 of file nav_automatic.h.


Enumeration Type Documentation

Enumerator:
NAVAUTO_MOV_OPTS_NONE 
NAVAUTO_MOV_OPTS_STAY_CURRENT_DIR 

Definition at line 119 of file nav_automatic.h.


Function Documentation

uint16_t navauto_close ( void  )
Returns:
If a play list file is open then it is the last position in the file list else it is the directory level corresponding at the last selected file
//! At the end of this routine, the selected file of current navigator is :
//! - the play list file (in case of a play list file has been opened)
//! - the last selected file (in other case)
//! 

Definition at line 520 of file nav_automatic.c.

Navauto_mode navauto_getmode ( void  )
Returns:
Used navigation mode (NAVAUTO_MODE_DISKS, NAVAUTO_MODE_DIRONLY, NAVAUTO_MODE_DIRSUB)
//! This parameter is ignored then a play list file is selected
//! 

Definition at line 171 of file nav_automatic.c.

uint16_t navauto_getnb ( void  )

Definition at line 533 of file nav_automatic.c.

uint16_t navauto_getpos ( void  )

Definition at line 540 of file nav_automatic.c.

Navauto_rand navauto_getrand ( void  )
Returns:
random used

Definition at line 204 of file nav_automatic.c.

void navauto_init ( const FS_STRING  sz_filterext)
Parameters:
sz_filterextfile extension filter
//! This parameter is ignored then a play list file is selected
//! 

Definition at line 302 of file nav_automatic.c.

Navauto_mov_state navauto_mov ( bool  b_direction,
navauto_mov_options_t  options 
)
Parameters:
b_directionjump direction (FS_FIND_NEXT or FS_FIND_PREV)
optionsjump direction (FS_FIND_NEXT or FS_FIND_PREV)
Returns:
the status of the action
//! When the random is ON, the direction is ignored
//! 

Definition at line 584 of file nav_automatic.c.

bool navauto_open ( bool  b_playlist,
uint16_t  pos 
)
Parameters:
b_playlistif true then the current selected file is a play list file to open else create a file list with files included in a disk part
posIf b_playlist true, then position in the play list to start else folder level of the current position
Returns:
false, in case of error or file list empty

Definition at line 319 of file nav_automatic.c.

bool navauto_setmode ( Navauto_mode  exp_mode)
Parameters:
exp_modemode to select (NAVAUTO_MODE_DISKS, NAVAUTO_MODE_DIRONLY, NAVAUTO_MODE_DIRSUB)
Returns:
true, mode changed
false, mode can't be changed (note: the selected file must be close)
//! This parameter is ignored then a play list file is selected
//! When the mode change, the folder level is reseted at the current position.
//! 

Definition at line 189 of file nav_automatic.c.

bool navauto_setpos ( uint16_t  u16_pos)
Parameters:
u16_posnew position to select
Returns:
false in case of error

Definition at line 552 of file nav_automatic.c.

void navauto_setrand ( Navauto_rand  rand)
Parameters:
randrandom mode to use

Definition at line 214 of file nav_automatic.c.