UbixOS
2.0
|
Go to the source code of this file.
Data Structures | |
struct | lfn_cache |
Macros | |
#define | GET_16BIT_WORD(buffer, location) ( ((uint16)buffer[location+1]<<8) + (uint16)buffer[location+0] ) |
#define | GET_32BIT_WORD(buffer, location) ( ((uint32)buffer[location+3]<<24) + ((uint32)buffer[location+2]<<16) + ((uint32)buffer[location+1]<<8) + (uint32)buffer[location+0] ) |
#define | MAX_LFN_ENTRY_LENGTH 13 |
#define | MAX_LONGFILENAME_ENTRIES 20 |
#define | SET_16BIT_WORD(buffer, location, value) |
#define | SET_32BIT_WORD(buffer, location, value) |
Functions | |
void | fatfs_convert_from_fat_date (uint16 fat_date, int *day, int *month, int *year) |
void | fatfs_convert_from_fat_time (uint16 fat_time, int *hours, int *minutes, int *seconds) |
uint16 | fatfs_convert_to_fat_date (int day, int month, int year) |
uint16 | fatfs_convert_to_fat_time (int hours, int minutes, int seconds) |
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_print_sector (uint32 sector, uint8 *data) |
void | fatfs_sfn_create_entry (char *shortfilename, uint32 size, uint32 startCluster, struct fat_dir_entry *entry, int dir) |
#define GET_16BIT_WORD | ( | buffer, | |
location | |||
) | ( ((uint16)buffer[location+1]<<8) + (uint16)buffer[location+0] ) |
Definition at line 17 of file fat_misc.h.
#define GET_32BIT_WORD | ( | buffer, | |
location | |||
) | ( ((uint32)buffer[location+3]<<24) + ((uint32)buffer[location+2]<<16) + ((uint32)buffer[location+1]<<8) + (uint32)buffer[location+0] ) |
Definition at line 16 of file fat_misc.h.
#define MAX_LFN_ENTRY_LENGTH 13 |
Definition at line 11 of file fat_misc.h.
#define MAX_LONGFILENAME_ENTRIES 20 |
Definition at line 10 of file fat_misc.h.
#define SET_16BIT_WORD | ( | buffer, | |
location, | |||
value | |||
) |
Definition at line 24 of file fat_misc.h.
#define SET_32BIT_WORD | ( | buffer, | |
location, | |||
value | |||
) |
void fatfs_convert_from_fat_date | ( | uint16 | fat_date, |
int * | day, | ||
int * | month, | ||
int * | year | ||
) |
void fatfs_convert_from_fat_time | ( | uint16 | fat_time, |
int * | hours, | ||
int * | minutes, | ||
int * | seconds | ||
) |
uint16 fatfs_convert_to_fat_date | ( | int | day, |
int | month, | ||
int | year | ||
) |
uint16 fatfs_convert_to_fat_time | ( | int | hours, |
int | minutes, | ||
int | seconds | ||
) |
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().
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.
int fatfs_entry_lfn_exists | ( | struct lfn_cache * | lfn, |
struct fat_dir_entry * | entry | ||
) |
Definition at line 132 of file fat_misc.c.
References fat_dir_entry::Attr, FILE_ATTR_LFN_TEXT, FILE_ATTR_SYSHID, FILE_ATTR_VOLUME_ID, FILE_HEADER_BLANK, FILE_HEADER_DELETED, fat_dir_entry::Name, and lfn_cache::no_of_strings.
Referenced by fatfs_get_file_entry(), and fatfs_list_directory_next().
int fatfs_entry_lfn_invalid | ( | struct fat_dir_entry * | entry | ) |
Definition at line 121 of file fat_misc.c.
References fat_dir_entry::Attr, FILE_ATTR_SYSHID, FILE_ATTR_VOLUME_ID, FILE_HEADER_BLANK, FILE_HEADER_DELETED, and fat_dir_entry::Name.
Referenced by fatfs_get_file_entry(), fatfs_list_directory_next(), fatfs_mark_file_deleted(), fatfs_sfn_exists(), and fatfs_update_file_length().
int fatfs_entry_lfn_text | ( | struct fat_dir_entry * | entry | ) |
Definition at line 110 of file fat_misc.c.
References fat_dir_entry::Attr, and FILE_ATTR_LFN_TEXT.
Referenced by fatfs_get_file_entry(), fatfs_list_directory_next(), fatfs_mark_file_deleted(), fatfs_sfn_exists(), and fatfs_update_file_length().
int fatfs_entry_sfn_only | ( | struct fat_dir_entry * | entry | ) |
Definition at line 142 of file fat_misc.c.
References fat_dir_entry::Attr, FILE_ATTR_LFN_TEXT, FILE_ATTR_SYSHID, FILE_ATTR_VOLUME_ID, FILE_HEADER_BLANK, FILE_HEADER_DELETED, and fat_dir_entry::Name.
Referenced by fatfs_get_file_entry(), fatfs_list_directory_next(), fatfs_mark_file_deleted(), fatfs_sfn_exists(), and fatfs_update_file_length().
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().
Definition at line 56 of file fat_misc.c.
References MAX_LFN_ENTRY_LENGTH, MAX_LONGFILENAME_ENTRIES, lfn_cache::no_of_strings, and lfn_cache::String.
Referenced by fatfs_get_file_entry(), and fatfs_list_directory_next().
char* fatfs_lfn_cache_get | ( | struct lfn_cache * | lfn | ) |
Definition at line 94 of file fat_misc.c.
References MAX_LONGFILENAME_ENTRIES, lfn_cache::no_of_strings, lfn_cache::Null, and lfn_cache::String.
Referenced by fatfs_get_file_entry(), and fatfs_list_directory_next().
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().
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().
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().
int fatfs_lfn_generate_tail | ( | char * | sfn_output, |
char * | sfn_input, | ||
uint32 | tailNum | ||
) |
Definition at line 346 of file fat_misc.c.
References memset().
void fatfs_sfn_create_entry | ( | char * | shortfilename, |
uint32 | size, | ||
uint32 | startCluster, | ||
struct fat_dir_entry * | entry, | ||
int | dir | ||
) |
Definition at line 226 of file fat_misc.c.
References fat_dir_entry::Attr, fat_dir_entry::CrtDate, fat_dir_entry::CrtTime, fat_dir_entry::CrtTimeTenth, FAT_HTONL, FAT_HTONS, FAT_SFN_SIZE_FULL, FILE_TYPE_DIR, FILE_TYPE_FILE, fat_dir_entry::FileSize, fat_dir_entry::FstClusHI, fat_dir_entry::FstClusLO, fat_dir_entry::LstAccDate, fat_dir_entry::Name, fat_dir_entry::NTRes, fat_dir_entry::WrtDate, and fat_dir_entry::WrtTime.