6 #ifndef __FILE_SYSTEM_API_H_ 7 #define __FILE_SYSTEM_API_H_ 11 #include "../FATMacro.h" 12 #include "../filesystem.h" 13 #include "../fsutilities.h" 14 #include "../filesystem.h" 15 #include "../../include/mystring.h" 17 #include "../../include/utilities.h" 18 #include "../../include/stdio.h" 126 const uint8_t*
const fn = p->
filename;
130 if (fn[0] ==
S_DEL) {
193 while (*pFAT_ITEM != 0xFFFF) {
196 pFAT_ITEM = FAT_table + *pFAT_ITEM;
#define TYPE_FLDR
type file directory
#define ERR_TYPE_DOC
target type is partition doc, unable
#define FAT_sys
system file
static FAT_ITEM * __prev_item(FAT_ITEM *p)
static FAT_ITEM * __next_item(FAT_ITEM *p)
#define SECTOR_PER_CLUSTER
#define USER_PROGRAM_ADDRESS
#define DATA_BLOCK_ADDRESS
#define ERR_NOT_FOUND
file not found
#define ERR_TYPE_FLDR
target type is folder, unable to execute the operation
static int16_t __rm_this_file(FAT_ITEM *p)
static void loadLogicSector(uint16_t lgsector, uint16_t addr, uint16_t num)
#define TYPE_FILE
type file
static void __print_file_cluster_list(const FAT_ITEM *pfat)
#define S_DEL
has been deleted, can be reused
static int16_t __load_program(const char *targetFilename)
uint32_t filesize
in bytes
#define ROOT_AREA_ADDRESS
static int16_t puti(int32_t num)
static int16_t __FAT_item_type(const FAT_ITEM *p)
int strcmp(const char *lhs, const char *rhs)
#define TYPE_DOC
type (reserved) document for file system
static int16_t __run_this_file(FAT_ITEM *p)
static FAT_ITEM * __jmp_into_dir(const FAT_ITEM *p)
#define ERR_SYS_PROTC
system protected file, not allow executing the operation
#define S_UNUSED
item unused
#define FAT_TABLE_ADDRESS
static int16_t __has_prev_item(const FAT_ITEM *p)
static FAT_ITEM * __get_root_dir()
#define FAT_doc
partition reserved doc
define error code that is used in fsapi.h
#define filesize2sectors(X)
static int16_t __has_next_item(const FAT_ITEM *p)
static int16_t puts(char const *str)
static int16_t __FAT_showable_item(const FAT_ITEM *p)