550W Document
550W, a high-end OS
fat32.h 文件参考
#include <common/types.h>
fat32.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

struct  fat32
 
struct  short_name_entry
 
struct  long_name_entry
 
union  dentry
 
struct  dir_info
 

宏定义

#define max(x, y)   (((x) > (y)) ? (x) : (y))
 
#define min(x, y)   (((x) > (y)) ? (y) : (x))
 
#define FAT32_BOOT_SEC   0
 
#define BPB_BYTES_PER_SEC   0x0B
 
#define BPB_SEC_PER_CLUSTER   0x0D
 
#define BPB_RSVD_SEC_CNT   0x0E
 
#define BPB_FAT_NUM   0x10
 
#define BPB_HIDD_SEC   0x1C
 
#define BPB_TOTL_SEC   0x20
 
#define BPB_SEC_PER_FAT   0x24
 
#define BPB_ROOT_CLUSTER   0x2c
 
#define ATTR_READ_WRITE   0x00
 
#define ATTR_READ_ONLY   0x01
 
#define ATTR_HIDDEN   0x02
 
#define ATTR_SYSTEM   0x04
 
#define ATTR_VOLUME_ID   0x08
 
#define ATTR_DIRECTORY   0x10
 
#define ATTR_ARCHIVE   0x20
 
#define ATTR_LONG_FILE_NAME   0x0F
 
#define ATTR_LINK   0x40
 
#define ATTR_CHARACTER_DEVICE   0x80
 
#define SHORT_FIR_NAME   8
 
#define SHORT_EXT_NAME   3
 
#define MAX_SHORT_NAME   11
 
#define MAX_NAME_LEN   256
 
#define MAX_PATH_LEN   512 /* TODO : is there any limitation? */
 
#define DENTRY_LEN   32
 
#define LONG_NAME1_LEN   5
 
#define LONG_NAME2_LEN   6
 
#define LONG_NAME3_LEN   2
 
#define LONG_NAME_LEN   (LONG_NAME1_LEN + LONG_NAME2_LEN + LONG_NAME3_LEN)
 
#define LAST_LONG_ENTRY   0x40
 
#define LONG_ENTRY_SEQ   0x1f
 
#define FAT_MASK   0x0fffffffu
 
#define FAT_MAX   0x0ffffff8u /* end of the file */
 
#define FAT_BAD   0x0ffffff7u /* bad cluster of SDcard */
 
#define FAT_ENTRY_SIZE   4
 

类型定义

typedef struct fat32 fat32_t
 
typedef union dentry dentry_t
 
typedef struct dir_info dir_info_t
 

函数

struct short_name_entry __attribute__ ((packed, aligned(4))) short_name_entry_t
 

变量

fat32_t fat
 
char name1 [SHORT_FIR_NAME]
 
char name2 [SHORT_EXT_NAME]
 
uint8_t attr
 
uint8_t nt_res
 
uint8_t crt_time_tenth
 
uint16_t crt_time
 
uint16_t crt_date
 
uint16_t lst_acce_date
 
uint16_t fst_clus_hi
 
uint16_t lst_wrt_time
 
uint16_t lst_wrt_date
 
uint16_t fst_clus_lo
 
uint32_t file_size
 
uint8_t order
 
uint8_t type
 
uint8_t checksum
 
uint16_t rsvd
 
uint16_t name3 [LONG_NAME3_LEN]
 
dir_info_t root_dir
 
dir_info_t cur_dir
 

宏定义说明

◆ ATTR_ARCHIVE

#define ATTR_ARCHIVE   0x20

◆ ATTR_CHARACTER_DEVICE

#define ATTR_CHARACTER_DEVICE   0x80

◆ ATTR_DIRECTORY

#define ATTR_DIRECTORY   0x10

◆ ATTR_HIDDEN

#define ATTR_HIDDEN   0x02

◆ ATTR_LINK

#define ATTR_LINK   0x40

◆ ATTR_LONG_FILE_NAME

#define ATTR_LONG_FILE_NAME   0x0F

◆ ATTR_READ_ONLY

#define ATTR_READ_ONLY   0x01

◆ ATTR_READ_WRITE

#define ATTR_READ_WRITE   0x00

◆ ATTR_SYSTEM

#define ATTR_SYSTEM   0x04

◆ ATTR_VOLUME_ID

#define ATTR_VOLUME_ID   0x08

◆ BPB_BYTES_PER_SEC

#define BPB_BYTES_PER_SEC   0x0B

◆ BPB_FAT_NUM

#define BPB_FAT_NUM   0x10

◆ BPB_HIDD_SEC

#define BPB_HIDD_SEC   0x1C

◆ BPB_ROOT_CLUSTER

#define BPB_ROOT_CLUSTER   0x2c

◆ BPB_RSVD_SEC_CNT

#define BPB_RSVD_SEC_CNT   0x0E

◆ BPB_SEC_PER_CLUSTER

#define BPB_SEC_PER_CLUSTER   0x0D

◆ BPB_SEC_PER_FAT

#define BPB_SEC_PER_FAT   0x24

◆ BPB_TOTL_SEC

#define BPB_TOTL_SEC   0x20

◆ DENTRY_LEN

#define DENTRY_LEN   32

◆ FAT32_BOOT_SEC

#define FAT32_BOOT_SEC   0

◆ FAT_BAD

#define FAT_BAD   0x0ffffff7u /* bad cluster of SDcard */

◆ FAT_ENTRY_SIZE

#define FAT_ENTRY_SIZE   4

◆ FAT_MASK

#define FAT_MASK   0x0fffffffu

◆ FAT_MAX

#define FAT_MAX   0x0ffffff8u /* end of the file */

◆ LAST_LONG_ENTRY

#define LAST_LONG_ENTRY   0x40

◆ LONG_ENTRY_SEQ

#define LONG_ENTRY_SEQ   0x1f

◆ LONG_NAME1_LEN

#define LONG_NAME1_LEN   5

◆ LONG_NAME2_LEN

#define LONG_NAME2_LEN   6

◆ LONG_NAME3_LEN

#define LONG_NAME3_LEN   2

◆ LONG_NAME_LEN

#define LONG_NAME_LEN   (LONG_NAME1_LEN + LONG_NAME2_LEN + LONG_NAME3_LEN)

◆ max

#define max (   x,
 
)    (((x) > (y)) ? (x) : (y))

◆ MAX_NAME_LEN

#define MAX_NAME_LEN   256

◆ MAX_PATH_LEN

#define MAX_PATH_LEN   512 /* TODO : is there any limitation? */

◆ MAX_SHORT_NAME

#define MAX_SHORT_NAME   11

◆ min

#define min (   x,
 
)    (((x) > (y)) ? (y) : (x))

◆ SHORT_EXT_NAME

#define SHORT_EXT_NAME   3

◆ SHORT_FIR_NAME

#define SHORT_FIR_NAME   8

类型定义说明

◆ dentry_t

typedef union dentry dentry_t

◆ dir_info_t

typedef struct dir_info dir_info_t

◆ fat32_t

typedef struct fat32 fat32_t

函数说明

◆ __attribute__()

struct short_name_entry __attribute__ ( (packed, aligned(4))  )

变量说明

◆ attr

uint8_t attr

◆ checksum

uint8_t checksum

◆ crt_date

uint16_t crt_date

◆ crt_time

uint16_t crt_time

◆ crt_time_tenth

uint8_t crt_time_tenth

◆ cur_dir

dir_info_t cur_dir

◆ fat

fat32_t fat
extern

◆ file_size

uint32_t file_size

◆ fst_clus_hi

uint16_t fst_clus_hi

◆ fst_clus_lo

uint16_t fst_clus_lo

◆ lst_acce_date

uint16_t lst_acce_date

◆ lst_wrt_date

uint16_t lst_wrt_date

◆ lst_wrt_time

uint16_t lst_wrt_time

◆ name1

uint16_t name1

◆ name2

uint16_t name2

◆ name3

uint16_t name3[LONG_NAME3_LEN]

◆ nt_res

uint8_t nt_res

◆ order

uint8_t order

◆ root_dir

dir_info_t root_dir
extern

◆ rsvd

uint16_t rsvd

◆ type

uint8_t type