Atmel Software Framework

nav_flat.h File Reference
#include "fs_com.h"

Functions

bool nav_flat_cd (void)
 This function enters in the selected directory in file list FLAT. More...
 
bool nav_flat_fileisnotopen (void)
 This function checks if no file is opened. More...
 
bool nav_flat_findname (const FS_STRING sz_name, bool b_match_case)
 This function searches a file name in file list FLAT. More...
 
uint16_t nav_flat_get (void)
 This function returns the position of selected file in file list FLAT. More...
 
bool nav_flat_goto (uint16_t u16_newpos)
 This function goes to a position in file list FLAT. More...
 
bool nav_flat_gotoparent (void)
 This function goes to the parent directory. More...
 
bool nav_flat_mount (void)
 This function mounts the selected partition. More...
 
uint16_t nav_flat_nb (void)
 This function computes the number of files and directories present in the file list FLAT. More...
 
bool nav_flat_next (void)
 Go to next file or directory in file list FLAT. More...
 
bool nav_flat_previous (void)
 Go to previous file or directory in file list FLAT. More...
 
bool nav_flat_reset (void)
 This function resets the selection pointer, so "no file is selected" in file list FLAT. More...
 
bool nav_flat_root (void)
 This function initializes the file list on the root directory. More...
 
bool nav_flat_validpos (void)
 This function checks if a file is selected. More...
 

bool nav_flat_cd ( void  )

This function enters in the selected directory in file list FLAT.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_cd(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

bool nav_flat_fileisnotopen ( void  )

This function checks if no file is opened.

Returns
true if no file is opened
false if a file is opened

References nav_filelist_fileisnotopen().

bool nav_flat_findname ( const FS_STRING  sz_name,
bool  b_match_case 
)

This function searches a file name in file list FLAT.

@param     sz_name        name to search (UNICODE or ASCII) <br>
                          It must be terminated by NULL or '*' value
@param     b_match_case   false to ignore the case

@return    false in case of error, see global value "fs_g_status" for more detail
@return    true otherwise
//! This function starts a search at the next position of the current in file list
//! 

References FS_NAME_CHECK, nav_file_name(), and nav_flat_next().

uint16_t nav_flat_get ( void  )

This function returns the position of selected file in file list FLAT.

Returns
position of selected file (0 is the first position)
FS_NO_SEL, in case of no file selected

References fs_g_nav, nav_filelist_get(), and Fs_management::u16_flat_pos_offset.

Referenced by nav_flat_goto(), and nav_flat_nb().

bool nav_flat_goto ( uint16_t  u16_newpos)

This function goes to a position in file list FLAT.

Parameters
u16_newposnew position to select (0 is the first position)
Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References nav_flat_get(), nav_flat_next(), nav_flat_previous(), nav_flat_reset(), and nav_flat_validpos().

Referenced by nav_flat_nb().

bool nav_flat_gotoparent ( void  )

This function goes to the parent directory.

@return  false in case of error, see global value "fs_g_status" for more detail
@return  true otherwise
//! After the selected file is the first entry of the new file list FLAT
//! 

References _MEM_TYPE_SLOW_, fs_g_nav, index, nav_dir_gotoparent(), nav_filelist_reset(), nav_flat_next(), nav_getindex(), nav_gotoindex(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

bool nav_flat_mount ( void  )

This function mounts the selected partition.

@return  false in case of error, see global value "fs_g_status" for more detail
@return  true otherwise
//! If the FS_MULTI_PARTITION option is disabled
//! then the mount routine selects the first partition supported by file system. <br>
//! After mount, the file list contains files and directories of ROOT directory
//! 

References fs_g_nav, nav_partition_mount(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

uint16_t nav_flat_nb ( void  )

This function computes the number of files and directories present in the file list FLAT.

Returns
number of files and directories present in the file list FLAT

References nav_flat_get(), nav_flat_goto(), nav_flat_next(), and nav_flat_reset().

bool nav_flat_next ( void  )

Go to next file or directory in file list FLAT.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References FS_FIND_NEXT, fs_g_nav, nav_dir_cd(), nav_dir_gotoparent(), nav_file_isdir(), nav_filelist_get(), nav_filelist_set(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_flat_findname(), nav_flat_goto(), nav_flat_gotoparent(), and nav_flat_nb().

bool nav_flat_previous ( void  )

Go to previous file or directory in file list FLAT.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References FS_FIND_NEXT, FS_FIND_PREV, fs_g_nav, nav_dir_cd(), nav_dir_gotoparent(), nav_file_isdir(), nav_filelist_get(), nav_filelist_set(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_flat_goto().

bool nav_flat_reset ( void  )

This function resets the selection pointer, so "no file is selected" in file list FLAT.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_gotoparent(), nav_filelist_reset(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_flat_goto(), and nav_flat_nb().

bool nav_flat_root ( void  )

This function initializes the file list on the root directory.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

This function initializes the file list on the root directory.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_root(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

bool nav_flat_validpos ( void  )

This function checks if a file is selected.

Returns
true if a file is selected
false if no file is selected

References nav_filelist_validpos().

Referenced by nav_flat_goto().