UbixOS  2.0
fat_access.c File Reference
#include <string.h>
#include "fat_defs.h"
#include "fat_access.h"
#include "fat_table.h"
#include "fat_write.h"
#include "fat_string.h"
#include "fat_misc.h"
Include dependency graph for fat_access.c:

Go to the source code of this file.

Functions

uint32 fatfs_get_file_entry (struct fatfs *fs, uint32 Cluster, char *name_to_find, struct fat_dir_entry *sfEntry)
 
uint32 fatfs_get_root_cluster (struct fatfs *fs)
 
int fatfs_init (struct fatfs *fs)
 
uint32 fatfs_lba_of_cluster (struct fatfs *fs, uint32 Cluster_Number)
 
int fatfs_list_directory_next (struct fatfs *fs, struct fs_dir_list_status *dirls, struct fs_dir_ent *entry)
 
void fatfs_list_directory_start (struct fatfs *fs, struct fs_dir_list_status *dirls, uint32 StartCluster)
 
int fatfs_mark_file_deleted (struct fatfs *fs, uint32 Cluster, char *shortname)
 
int fatfs_read_sector (struct fatfs *fs, uint32 cluster, uint32 sector, uint8 *target)
 
int fatfs_sector_read (struct fatfs *fs, uint32 lba, uint8 *target, uint32 count)
 
int fatfs_sector_reader (struct fatfs *fs, uint32 start_cluster, uint32 offset, uint8 *target)
 
int fatfs_sector_write (struct fatfs *fs, uint32 lba, uint8 *target, uint32 count)
 
int fatfs_sfn_exists (struct fatfs *fs, uint32 Cluster, char *shortname)
 
void fatfs_show_details (struct fatfs *fs)
 
int fatfs_update_file_length (struct fatfs *fs, uint32 Cluster, char *shortname, uint32 fileLength)
 
int fatfs_write_sector (struct fatfs *fs, uint32 cluster, uint32 sector, uint8 *target)
 

Function Documentation

◆ fatfs_get_file_entry()

uint32 fatfs_get_file_entry ( struct fatfs fs,
uint32  Cluster,
char *  name_to_find,
struct fat_dir_entry sfEntry 
)

◆ fatfs_get_root_cluster()

uint32 fatfs_get_root_cluster ( struct fatfs fs)

Definition at line 373 of file fat_access.c.

◆ fatfs_init()

◆ fatfs_lba_of_cluster()

uint32 fatfs_lba_of_cluster ( struct fatfs fs,
uint32  Cluster_Number 
)

Definition at line 191 of file fat_access.c.

References FAT_SECTOR_SIZE, and FAT_TYPE_16.

Referenced by fatfs_read_sector(), fatfs_sector_reader(), and fatfs_write_sector().

◆ fatfs_list_directory_next()

◆ fatfs_list_directory_start()

void fatfs_list_directory_start ( struct fatfs fs,
struct fs_dir_list_status dirls,
uint32  StartCluster 
)

◆ fatfs_mark_file_deleted()

int fatfs_mark_file_deleted ( struct fatfs fs,
uint32  Cluster,
char *  shortname 
)

◆ fatfs_read_sector()

int fatfs_read_sector ( struct fatfs fs,
uint32  cluster,
uint32  sector,
uint8 target 
)

Definition at line 263 of file fat_access.c.

References FAT_TYPE_16, and fatfs_lba_of_cluster().

Here is the call graph for this function:

◆ fatfs_sector_read()

int fatfs_sector_read ( struct fatfs fs,
uint32  lba,
uint8 target,
uint32  count 
)

Definition at line 200 of file fat_access.c.

◆ fatfs_sector_reader()

int fatfs_sector_reader ( struct fatfs fs,
uint32  start_cluster,
uint32  offset,
uint8 target 
)

◆ fatfs_sector_write()

int fatfs_sector_write ( struct fatfs fs,
uint32  lba,
uint8 target,
uint32  count 
)

Definition at line 206 of file fat_access.c.

◆ fatfs_sfn_exists()

int fatfs_sfn_exists ( struct fatfs fs,
uint32  Cluster,
char *  shortname 
)

◆ fatfs_show_details()

void fatfs_show_details ( struct fatfs fs)

Definition at line 362 of file fat_access.c.

References FAT_PRINTF, and FAT_TYPE_32.

◆ fatfs_update_file_length()

int fatfs_update_file_length ( struct fatfs fs,
uint32  Cluster,
char *  shortname,
uint32  fileLength 
)

◆ fatfs_write_sector()

int fatfs_write_sector ( struct fatfs fs,
uint32  cluster,
uint32  sector,
uint8 target 
)

Definition at line 311 of file fat_access.c.

References FAT_TYPE_16, and fatfs_lba_of_cluster().

Here is the call graph for this function: