Microchip® Advanced Software Framework

fat_unusual.c File Reference
#include "conf_explorer.h"
#include "fs_com.h"
#include "fat.h"
#include <LIB_MEM>
#include <LIB_CTRLACCESS>

Functions

bool fat_clean_zone (bool b_MBR)
 
void fat_get_date (FS_STRING sz_date, bool type_date)
 This function reads the information about a date. More...
 
uint32_t fat_getfreespace (void)
 This function returns the space free in the partition. More...
 
uint8_t fat_getfreespace_percent (void)
 This function returns the space free in percent. More...
 
bool fat_initialize_fat (void)
 
bool fat_mount (void)
 This function mounts a partition file system (FAT12, FAT16 or FAT32) of selected drive. More...
 
bool fat_select_filesystem (uint8_t u8_fat_type, bool b_MBR)
 
bool fat_write_MBR (void)
 
bool fat_write_PBR (bool b_MBR)
 
Sub routines used by date read-write routines
void fat_translatedate_number_to_ascii (FS_STRING sz_date, PTR_CACHE ptr_date, bool enable_ms)
 This function translates a date FAT value to ascii string. More...
 
void fat_translate_number_to_ascii (FS_STRING sz_ascii_number, uint8_t u8_size_number_ascii, uint8_t u8_nb_increment)
 This function translates a digital number to a ASCII number. More...
 
void fat_translatedate_ascii_to_number (const FS_STRING sz_date, PTR_CACHE ptr_date, bool enable_ms)
 
uint16_t fat_translate_ascii_to_number (const FS_STRING sz_ascii_number, uint8_t u8_size_number_ascii)
 
Sub routine used to create a entry file
void fat_create_long_name_entry (FS_STRING sz_name, uint8_t u8_crc, uint8_t u8_id)
 
uint8_t fat_create_short_entry_name (FS_STRING sz_name, FS_STRING short_name, uint8_t nb, bool mode)
 
uint8_t fat_find_short_entry_name (FS_STRING sz_name)
 
bool fat_entry_shortname_compare (FS_STRING short_name)
 
uint8_t fat_check_name (FS_STRING sz_name)
 
uint8_t fat_translate_char_shortname (uint8_t character)
 
bool fat_alloc_entry_free (uint8_t u8_nb_entry)
 
bool fat_garbage_collector_entry (void)
 

bool fat_alloc_entry_free ( uint8_t  u8_nb_entry)
uint8_t fat_check_name ( FS_STRING  sz_name)
bool fat_clean_zone ( bool  b_MBR)
void fat_create_long_name_entry ( FS_STRING  sz_name,
uint8_t  u8_crc,
uint8_t  u8_id 
)
uint8_t fat_create_short_entry_name ( FS_STRING  sz_name,
FS_STRING  short_name,
uint8_t  nb,
bool  mode 
)
bool fat_entry_shortname_compare ( FS_STRING  short_name)
uint8_t fat_find_short_entry_name ( FS_STRING  sz_name)
bool fat_garbage_collector_entry ( void  )
bool fat_initialize_fat ( void  )
bool fat_select_filesystem ( uint8_t  u8_fat_type,
bool  b_MBR 
)
uint16_t fat_translate_ascii_to_number ( const FS_STRING  sz_ascii_number,
uint8_t  u8_size_number_ascii 
)
uint8_t fat_translate_char_shortname ( uint8_t  character)
void fat_translate_number_to_ascii ( FS_STRING  sz_ascii_number,
uint8_t  u8_size_number_ascii,
uint8_t  u8_nb_increment 
)

This function translates a digital number to a ASCII number.

@param     sz_ascii_number         ascii string to increment (ex:"1907")
@param     u8_size_number_ascii    number of digit (ex:4)
@param     u8_nb_increment         number to add (ex:"102")
//! OUT, Update sz_ascii_number (ex:"2009")
//! 

Referenced by fat_translatedate_number_to_ascii().

void fat_translatedate_ascii_to_number ( const FS_STRING  sz_date,
PTR_CACHE  ptr_date,
bool  enable_ms 
)
void fat_translatedate_number_to_ascii ( FS_STRING  sz_date,
PTR_CACHE  ptr_date,
bool  enable_ms 
)

This function translates a date FAT value to ascii string.

Parameters
sz_datetable to store the date information
storage format (ASCII) = "YYYYMMDDHHMMSSMS" = year, month, day, hour, minute, second, millisecond
ptr_datepointer on date in internal cache
enable_mstrue, translate the millisecond field

References fat_translate_number_to_ascii().

Referenced by fat_get_date().

bool fat_write_MBR ( void  )
bool fat_write_PBR ( bool  b_MBR)