fat32.h
来自「bu1566dsp芯片用来处理ov7660或其他30万摄像模组的图像预览.图像拍」· C头文件 代码 · 共 57 行
H
57 行
#ifndef __FAT32_H__
#define __FAT32_H__
#include "config.h"
/* 检测卡是否完全插入 check weather card is insert entirely */
#define UARTBUF_LENGTH 32
#define BUFFER_LENGTH 512
typedef struct
{
UINT32 StartSector;
UINT32 TotalSector;
UINT16 BPB_BytesPerSec;
UINT8 BPB_SecPerClus;
UINT8 BPB_NumFATs;
UINT16 BPB_RootEntCnt;
UINT16 BPB_TotSec16;
UINT32 BPB_TotSec32;
UINT32 FatStartSector;
UINT32 RootStartSector;
UINT32 FirstDataSector;
UINT32 BPB_FATSz32;
UINT32 RootStartCluster;
UINT32 TotCluster;
}SYS_INFO_BLOCK;
typedef struct{
UINT8 bFileOpen;
UINT32 StartCluster;
UINT32 LengthInByte;
UINT32 ClusterPointer;
UINT32 SectorPointer;
UINT16 OffsetofSector;
UINT8 SectorofCluster;
UINT32 pointer;
UINT32 FatSectorPointer;
}FILE_INFO;
extern SYS_INFO_BLOCK DeviceInfo;
extern FILE_INFO ThisFile;
extern UINT8 DBUF[BUFFER_LENGTH];
extern UINT8 UARTBUF[UARTBUF_LENGTH];
extern UINT32 DirStartCluster32,NowCluster32;
extern UINT32 NowSector;
extern UINT16 LSwapINT16(UINT16 dData1,UINT16 dData2);
extern UINT32 LSwapINT32(UINT32 dData1,UINT32 dData2,UINT32 dData3,UINT32 dData4);
extern UINT8 EnumSdDev(void);
extern UINT32 FirstSectorofCluster(UINT32 clusterNum);
extern UINT32 ThisFatSecNum(UINT32 clusterNum);
extern UINT32 ThisFatEntOffset(UINT32 clusterNum);
extern UINT32 GetNextClusterNum(UINT32 clusterNum);
extern UINT8 GoToPointer(UINT32 pointer);
extern UINT32 CreateClusterLink(UINT32 currentCluster);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?