?? fs_variable.lst
字號:
C51 COMPILER V7.00 FS_VARIABLE 04/28/2004 09:32:00 PAGE 1
C51 COMPILER V7.00, COMPILATION OF MODULE FS_VARIABLE
OBJECT MODULE PLACED IN C:\Documents and Settings\lvxc\桌面\AA\fs_variable.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE modules\file\fs_variable.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system
-;.\;.\;.\lib_refd) DEFINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\fs_variable.lst) OBJECT(C:\Documents and Settings\lvxc\桌面\A
-A\fs_variable.obj)
stmt level source
1 /*C**************************************************************************
2 * NAME: fs_variable.c
3 *----------------------------------------------------------------------------
4 * Copyright (c) 2003 Atmel.
5 *----------------------------------------------------------------------------
6 * RELEASE: snd1c-refd-nf-4_0_3
7 * REVISION: 1.3
8 *----------------------------------------------------------------------------
9 * PURPOSE:
10 * File system variable definition
11 *
12 * NOTES:
13 * Arrangement :
14 * FAT12/16 only
15 * FAT32 only
16 * FAT32 and ISO 9660
17 * FAT12/16 and ISO 9660 ?
18 *****************************************************************************/
19
20 /*_____ I N C L U D E S ____________________________________________________*/
21
22 #include "config.h" /* system configuration */
23 #include "..\mem\hard.h" /* low level function definition */
24 #include "file.h" /* file function definition */
25
26 #if ((MEM_CHIP_FS == FS_FAT_32) || (MEM_CARD_FS == FS_FAT_32))
#include "fat32.h" /* fat32 file-system definition */
#elif ((MEM_CHIP_FS == FS_FAT_12_16) || (MEM_CARD_FS == FS_FAT_12_16))
29 #include "fat.h"
30 #endif
31
32 #if ((MEM_CHIP_FS == FS_ISO) || (MEM_CARD_FS == FS_ISO))
#include "iso9660.h"
#endif
35
36
37
38 /*_____ M A C R O S ________________________________________________________*/
39
40
41 /*_____ D E F I N I T I O N ________________________________________________*/
42
43
44
45 extern pdata Byte gl_buffer[];
46
47
48 /* shared file system variables */
49
50 /* disk management */
51 data Uint32 fat_ptr_data; /* address of the first byte
52 /* of data */
53 xdata Byte fat_buf_sector[512]; /* 512 bytes buffer */
C51 COMPILER V7.00 FS_VARIABLE 04/28/2004 09:32:00 PAGE 2
54
55 /* directory management */
56 idata Uint16 fat_dclust_byte_count;/* byte counter in directory sector */
57 idata Uint32 fat_dir_current_sect; /* sector of selected entry in dir list */
58 xdata Uint16 fat_dir_list_index; /* index of current entry in dir list */
59 xdata Uint32 fat_dir_start_sect; /* start sector of dir list */
60 xdata Uint16 fat_dir_list_last; /* index of last entry in dir list */
61 idata Uint16 fat_dchain_index; /* the number of the fragment of the dir, in fact */
62 /* the index of the table in the cluster chain */
63 idata Uint16 fat_fchain_nb_clust; /* the offset of the cluster from the first cluster */
64 /* of the file fragment */
65
66
67 /* file management */
68 data Uint16 fat_fclust_byte_count; /* byte counter in file cluster */
69 xdata Byte current_ext;
70 xdata char ext[3]; /* file extension (limited to 3 characters) */
71 char pdata *lfn_name = &(gl_buffer[32]); /* long filename limited to MAX_FILENAME_LEN chars */
72
73 /* Mode repeat A/B variables */
74 xdata Byte fat_fchain_index_save;
75 xdata Byte fat_fchain_nb_clust_save;
76 xdata Uint16 fat_fclust_byte_count_save;
77
78
79
80
81 /* Specific variables for fat file system */
82 #if ((MEM_CHIP_FS == FS_FAT_32) || (MEM_CHIP_FS == FS_FAT_12_16) || (MEM_CARD_FS == FS_FAT_32) || (MEM_CAR
-D_FS == FS_FAT_12_16))
83 /* disk management */
84 data Uint32 fat_ptr_fats; /* address of the first byte of FAT */
85 data Uint32 fat_ptr_rdir;
86 data Byte fat_cluster_size; /* cluster size (sector count) */
87 idata Byte fat_cluster_mask; /* mask for end of cluster test */
88
89
90 bdata bit fat_is_fat16; /* TRUE: FAT16 - FALSE: FAT12 */
91 bdata bit fat_open_mode; /* READ or WRITE */
92 bdata bit fat_2_is_present; /* TRUE: 2 FATs - FALSE: 1 FAT */
93 bdata bit flag_end_disk_file;
94
95 xdata Uint32 fat_count_of_clusters;/* number of cluster - 2 */
96 xdata Union32 fat_file_size;
97 xdata Uint32 fat_fat_size; /* FAT size in sector count */
98
99 /* directory management */
100 xdata fat_st_clust_chain dclusters[MAX_DIR_FRAGMENT_NUMBER];
101 /* cluster chain for the current directory */
102 bdata bit dir_is_root; /* TRUE: point the root directory */
103
104 idata Byte fat_dchain_nb_clust; /* the offset of the cluster from the first cluster */
105 /* of the dir fragment */
106 xdata Byte fat_last_dclust_index;/* index of the last cluster in directory chain */
107 xdata Uint32 fat_dir_current_offs; /* entry offset from fat_dir_current_sect */
108 xdata fat_st_cache fat_cache; /* The cache structure, see the .h for more info */
109
110
111 /* file management */
112 xdata fat_st_clust_chain fclusters[MAX_FILE_FRAGMENT_NUMBER];
113 /* cluster chain for the current file */
114 idata Byte fat_last_clust_index;/* index of the last cluster in file chain */
C51 COMPILER V7.00 FS_VARIABLE 04/28/2004 09:32:00 PAGE 3
115 idata Byte fat_fchain_index; /* the number of the fragment of the file, in fact */
116 /* the index of the table in the cluster chain */
117
118 xdata Uint32 fat_current_file_size;
119 xdata Uint32 fat_rootclus_fat32; /* root cluster address */
120 bdata bit fat_last_dir_cluster_full;
121 bdata bit fat_no_entries_free;
122 xdata Uint16 fat_total_clusters;
123 xdata Uint32 last_free_cluster;
124
125 xdata Uint16 fat_root_entry; /* position in root dir */
126
127
128 idata Uint16 fat_current_end_entry_position;
129 idata Uint16 fat_current_start_entry_position;
130 xdata Uint16 fat_nb_deleted_entries;
131 xdata Uint16 fat_nb_total_entries;
132
133 bdata bit fat_is_fat32; /* TRUE: FAT32 - FALSE: FAT12/FAT16 */
134
135
136
137
138 #endif
139
140
141 #if (MEM_CHIP_FS == FS_ISO) || (MEM_CARD_FS == FS_ISO)
/* iso9660 variables */
xdata iso_VolumeDescriptor iso_header; /* iso header informations */
xdata iso_cache iso_file_cache; /* cache for the current file */
idata Uint16 iso_f_nb_sector;
idata Uint16 iso_f_max_sector;
bdata bit iso_cd; /* if set to one cd is iso else cd is joliet format */
#endif
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 1044 ----
PDATA SIZE = ---- ----
DATA SIZE = 16 ----
IDATA SIZE = 18 ----
BIT SIZE = 8 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -