⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 file_sect_server.h

📁 能够在单片机等小型处理器上使用的fat16文件系统
💻 H
字号:
#ifndef _SECT_SERVER_H
#define _SECT_SERVER_H
#include"file_header.h"
//#include"init.h"
#define PHYSICAL_BLOCK_SIZE     512 
// This small bootrecord will be in memory as long as the program is running
typedef struct 
{
	uchar valid;
	uchar fat_copies;
	uint root_directory_entries;
	uint number_of_sectors;
	uint sectors_per_fat;
	ulong total_sectors;
	uint reserved_sectors;
	uint hidden_sectors;
	uchar sectors_per_cluster;
} bootrecord_small;

// This is a global 512-byte buffer. 
// Sect_Read() puts data in this buffer.
// Sect_Write() gets data from this buffer.
extern char Scratch[];
// File space
//extern char *VFILE;
// Permanent copy of important fields from bootrecord:
extern bootrecord_small MBR;
#define Sect_Block_Size() ((unsigned)PHYSICAL_BLOCK_SIZE)


unsigned int Sect_Read(unsigned long sector);
void Sect_Write(unsigned long sector);
void Sect_Validate(void);
void Sect_Init(void);
unsigned Sect_Root_Dir(void) ;
unsigned Sect_Root_Dir_Last(void);
unsigned Sect_File_Data(void);
unsigned Sect_Fat1(void);
unsigned Sect_Fat2(void);
void Sect_Write_Multi_Fat(unsigned long sector);
unsigned long Sect_Sectors(void);
unsigned long Sect_Sectors(void);

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -