44#ifndef _FILE_SYSTEM_H_
45#define _FILE_SYSTEM_H_
51#include "physical_drive.h"
55#define NOP() assembly(nop)
75#define FS_MAX_VOLUMES ((uint8_t)5)
82#define FS_MAX_OBJECTS ((uint8_t)10)
96#define FSS_OK ((uint8_t)0)
101#define FSS_GENERAL_ERROR ((uint8_t)1)
106#define FSS_DRIVE_FULL ((uint8_t)2)
111#define FSS_END_OF_FILE ((uint8_t)3)
116#define FSS_END_OF_DIRECTORY ((uint8_t)4)
121#define FSS_NOT_IMPLEMENTED ((uint8_t)5)
140#define FS_FILE_READ 0x01
145#define FS_FILE_WRITE 0x02
150#define FS_FILE_OPEN_EXISTING 0x00
155#define FS_FILE_CREATE_NEW 0x04
160#define FS_FILE_CREATE_ALWAYS 0x08
165#define FS_FILE_OPEN_ALWAYS 0x10
170#define FS_FILE_OPEN_APPEND 0x30
fs_file_rw_pointer_t
: file_seek API Starting Offset
Definition file_system.h:188
@ SEEK_END
Definition file_system.h:191
@ SEEK_CURRENT
Definition file_system.h:190
@ SEEK_START
Definition file_system.h:189
logical_drive_type_t
Logical Drive File System Type Enumerator.
Definition file_system.h:226
@ FS_TYPE_FATFS
Definition file_system.h:228
@ FS_TYPE_UNINITIALIZED
Definition file_system.h:227
void * fs_file_t
: File data specific to a particular file system.
Definition file_system.h:200
void * fs_dir_t
: Directory Data specific to a particular File System.
Definition file_system.h:209
int8_t fs_status_t
: File System API return value
Definition file_system.h:181
fs_status_t file_system_mkdir(const char *__generic_ptr path)
Make new Directory.
fs_status_t file_system_remove(const char *__generic_ptr path)
Removes a File or a Directory.
fs_status_t file_system_format(const char *__generic_ptr path)
Format the Logical Drive.
fs_status_t file_system_unmount(const char *__generic_ptr path)
Unmount Logical Drive from the File System.
fs_status_t file_system_rename(const char *__generic_ptr old_path, const char *__generic_ptr new_path)
Renames a File or a Directory.
fs_status_t file_system_mount(logical_drive_t *const ldrive_base, const char *__generic_ptr path, physical_drive_t *const pdrive_base)
Mount Logical Drive to the File System.
Logical Drive Base Data Structure.
Definition file_system.h:246
logical_drive_type_t type
Definition file_system.h:248
uint8_t volume_id
Definition file_system.h:249
uint8_t object_count
Definition file_system.h:250
uint8_t error
Definition file_system.h:251
logical_drive_vector_table_t * vtptr
Definition file_system.h:247
Logical Drive Vector Table.
Definition fs_common.h:73
Physical Drive Base Data Structure Reference.
Definition physical_drive.h:127