UbixOS  2.0
fat_misc.c File Reference
#include <string.h>
#include "fat_misc.h"
Include dependency graph for fat_misc.c:

Go to the source code of this file.

Functions

int fatfs_entry_is_dir (struct fat_dir_entry *entry)
 
int fatfs_entry_is_file (struct fat_dir_entry *entry)
 
int fatfs_entry_lfn_exists (struct lfn_cache *lfn, struct fat_dir_entry *entry)
 
int fatfs_entry_lfn_invalid (struct fat_dir_entry *entry)
 
int fatfs_entry_lfn_text (struct fat_dir_entry *entry)
 
int fatfs_entry_sfn_only (struct fat_dir_entry *entry)
 
void fatfs_filename_to_lfn (char *filename, uint8 *buffer, int entry, uint8 sfnChk)
 
void fatfs_lfn_cache_entry (struct lfn_cache *lfn, uint8 *entryBuffer)
 
char * fatfs_lfn_cache_get (struct lfn_cache *lfn)
 
void fatfs_lfn_cache_init (struct lfn_cache *lfn, int wipeTable)
 
int fatfs_lfn_create_sfn (char *sfn_output, char *filename)
 
int fatfs_lfn_entries_required (char *filename)
 
int fatfs_lfn_generate_tail (char *sfn_output, char *sfn_input, uint32 tailNum)
 
void fatfs_sfn_create_entry (char *shortfilename, uint32 size, uint32 startCluster, struct fat_dir_entry *entry, int dir)
 

Function Documentation

◆ fatfs_entry_is_dir()

int fatfs_entry_is_dir ( struct fat_dir_entry entry)

Definition at line 152 of file fat_misc.c.

References fat_dir_entry::Attr, and FILE_TYPE_DIR.

Referenced by fatfs_list_directory_next().

◆ fatfs_entry_is_file()

int fatfs_entry_is_file ( struct fat_dir_entry entry)

Definition at line 161 of file fat_misc.c.

References fat_dir_entry::Attr, and FILE_TYPE_FILE.

◆ fatfs_entry_lfn_exists()

◆ fatfs_entry_lfn_invalid()

◆ fatfs_entry_lfn_text()

int fatfs_entry_lfn_text ( struct fat_dir_entry entry)

◆ fatfs_entry_sfn_only()

◆ fatfs_filename_to_lfn()

void fatfs_filename_to_lfn ( char *  filename,
uint8 buffer,
int  entry,
uint8  sfnChk 
)

Definition at line 186 of file fat_misc.c.

References buffer, FAT_DIR_ENTRY_SIZE, fatfs_lfn_entries_required(), MAX_LFN_ENTRY_LENGTH, memset(), and strlen().

Here is the call graph for this function:

◆ fatfs_lfn_cache_entry()

void fatfs_lfn_cache_entry ( struct lfn_cache lfn,
uint8 entryBuffer 
)

◆ fatfs_lfn_cache_get()

char* fatfs_lfn_cache_get ( struct lfn_cache lfn)

◆ fatfs_lfn_cache_init()

void fatfs_lfn_cache_init ( struct lfn_cache lfn,
int  wipeTable 
)

Definition at line 38 of file fat_misc.c.

References MAX_LFN_ENTRY_LENGTH, MAX_LONGFILENAME_ENTRIES, memset(), lfn_cache::no_of_strings, and lfn_cache::String.

Referenced by fatfs_get_file_entry(), and fatfs_list_directory_next().

Here is the call graph for this function:

◆ fatfs_lfn_create_sfn()

int fatfs_lfn_create_sfn ( char *  sfn_output,
char *  filename 
)

Definition at line 260 of file fat_misc.c.

References FAT_SFN_SIZE_FULL, FAT_SFN_SIZE_PARTIAL, memset(), and strlen().

Here is the call graph for this function:

◆ fatfs_lfn_entries_required()

int fatfs_lfn_entries_required ( char *  filename)

Definition at line 173 of file fat_misc.c.

References MAX_LFN_ENTRY_LENGTH, and strlen().

Referenced by fatfs_add_file_entry(), and fatfs_filename_to_lfn().

Here is the call graph for this function:

◆ fatfs_lfn_generate_tail()

int fatfs_lfn_generate_tail ( char *  sfn_output,
char *  sfn_input,
uint32  tailNum 
)

Definition at line 346 of file fat_misc.c.

References memset().

Here is the call graph for this function:

◆ fatfs_sfn_create_entry()