📄 apfs_fat32_lib.h
字号:
//-----------------------------------------------------------------------------
// This file is part of AP.FS
// AP.FS is a FAT32 file system face to the embedded system,It's target is to
// support the portable storage device such as SD Card,TF Card or USB Disc 's
// file system.
// please login www.another-prj.com to get more details.
// caiyuqing
// 2008-1-8
//-----------------------------------------------------------------------------
#ifndef _APFS_FAT32_ILB_H
#define _APFS_FAT32_ILB_H
#include "../typedef.h"
#include "apfs_fat32_opts.h"
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#define IN_USE 0
#define IN_ROOT 1
#define READ 2
#define WRITE 3
#define APPEND 4
#define BINARY 5
#define ERASE 6
#define SET_FLG(val,n) (val) |= (1<<(n))
#define CLR_FLG(val,n) (val) &= ~(1<<(n))
#define CHK_FLG(val,n) ((val)&(1<<(n)))
//-----------------------------------------------------------------------------
// file structure
//-----------------------------------------------------------------------------
struct apfs_file
{
UINT32 parent_cluster;
UINT32 start_cluster;
UINT32 file_ptr;
UINT32 current_block;
UINT32 file_length;
char path[MAX_LONG_FILENAME];
char file_name[MAX_LONG_FILENAME];
BYTE file_buf[512];
BYTE short_file_name[11];
UINT32 flag;
};
//-----------------------------------------------------------------------------
// lib function
//-----------------------------------------------------------------------------
void apfs_fat32_init_lib();
struct apfs_file* apfs_fat32_fopen(const char *path,const char *modifiers);
void apfs_fat32_fclose(struct apfs_file *file);
int apfs_fat32_fread(BYTE * buffer,UINT32 size,UINT32 count,struct apfs_file *fp);
char apfs_fat32_fgetc(struct apfs_file *fp);
int apfs_fat32_fseek(struct apfs_file *file , UINT32 offset , int origin);
int apfs_fat32_feof(struct apfs_file *fp);
int apfs_fat32_ftell(struct apfs_file *fp);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -