FatFS
FATFS::win
is only used within FatFS.
Symbol previews are coming soon...
Symbols
loading (3/5)...
Files
loading (3/5)...
Summary
Syntax
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
FatFS
FATFS::win
FATFS::win field
Syntax
Show:
Summary
Declaration
from
ff.h:176
BYTE
win
[
FF_MAX_SS
]
;
Examples
References
from
examples
Code
Location
Referrer
BYTE
win
[
FF_MAX_SS
]
;
/* Disk access window for Directory, FAT (and file data at tiny cfg) */
ff.h:176
if
(
disk_write
(
fs
->
pdrv
,
fs
->
win
,
fs
->
winsect
,
1
)
==
RES_OK
)
{
/* Write it back into the volume */
ff.c:1068
sync_window()
if
(
fs
->
n_fats
==
2
)
disk_write
(
fs
->
pdrv
,
fs
->
win
,
fs
->
winsect
+
fs
->
fsize
,
1
)
;
/* Reflect it to 2nd FAT if needed */
ff.c:1071
sync_window()
if
(
disk_read
(
fs
->
pdrv
,
fs
->
win
,
sect
,
1
)
!=
RES_OK
)
{
ff.c:1095
move_window()
memset
(
fs
->
win
,
0
,
SS
(
fs
)
)
;
ff.c:1124
sync_fs()
st_word
(
fs
->
win
+
BS_55AA
,
0xAA55
)
;
/* Boot signature */
ff.c:1125
sync_fs()
st_dword
(
fs
->
win
+
FSI_LeadSig
,
0x41615252
)
;
/* Leading signature */
ff.c:1126
sync_fs()
st_dword
(
fs
->
win
+
FSI_StrucSig
,
0x61417272
)
;
/* Structure signature */
ff.c:1127
sync_fs()
st_dword
(
fs
->
win
+
FSI_Free_Count
,
fs
->
free_clst
)
;
/* Number of free clusters */
ff.c:1128
sync_fs()
st_dword
(
fs
->
win
+
FSI_Nxt_Free
,
fs
->
last_clst
)
;
/* Last allocated culuster */
ff.c:1129
sync_fs()
disk_write
(
fs
->
pdrv
,
fs
->
win
,
fs
->
winsect
,
1
)
;
ff.c:1131
sync_fs()
wc
=
fs
->
win
[
bc
++
%
SS
(
fs
)
]
;
/* Get 1st byte of the entry */
ff.c:1186
get_fat()
wc
|=
fs
->
win
[
bc
%
SS
(
fs
)
]
<
<
8
;
/* Merge 2nd byte of the entry */
ff.c:1188
get_fat()
val
=
ld_word
(
fs
->
win
+
clst
*
2
%
SS
(
fs
)
)
;
/* Simple WORD array */
ff.c:1194
get_fat()
val
=
ld_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
)
&
0x0FFFFFFF
;
/* Simple DWORD array but mask out upper 4 bits */
ff.c:1199
get_fat()
p
=
fs
->
win
+
bc
++
%
SS
(
fs
)
;
ff.c:1261
put_fat()
p
=
fs
->
win
+
bc
%
SS
(
fs
)
;
ff.c:1266
put_fat()
st_word
(
fs
->
win
+
clst
*
2
%
SS
(
fs
)
,
(
WORD
)
val
)
;
/* Simple WORD array */
ff.c:1274
put_fat()
val
=
(
val
&
0x0FFFFFFF
)
|
(
ld_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
)
&
0xF0000000
)
;
ff.c:1285
put_fat()
st_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
,
val
)
;
ff.c:1287
put_fat()
memset
(
fs
->
win
,
0
,
SS
(
fs
)
)
;
/* Clear window buffer */
ff.c:1676
dir_clear()
ibuf
=
fs
->
win
;
szb
=
1
;
/* Use window buffer (many single-sector writes may take a time) */
ff.c:1688
dir_clear()
dp
->
dir
=
fs
->
win
+
(
ofs
%
SS
(
fs
)
)
;
/* Pointer to the entry in the win[] */
ff.c:1738
dir_sdi()
dp
->
dir
=
fs
->
win
+
ofs
%
SS
(
fs
)
;
/* Pointer to the entry in the win[] */
ff.c:1798
dir_next()
dp
->
obj
.
sclust
=
ld_clust
(
fs
,
fs
->
win
+
dp
->
dptr
%
SS
(
fs
)
)
;
/* Open next directory */
ff.c:3128
follow_path()
sign
=
ld_word
(
fs
->
win
+
BS_55AA
)
;
ff.c:3307
check_fs()
b
=
fs
->
win
[
BS_JmpBoot
]
;
ff.c:3311
check_fs()
if
(
sign
==
0xAA55
&&
!
memcmp
(
fs
->
win
+
BS_FilSysType32
,
"FAT32 "
,
8
)
)
{
ff.c:3313
check_fs()
w
=
ld_word
(
fs
->
win
+
BPB_BytsPerSec
)
;
ff.c:3317
check_fs()
b
=
fs
->
win
[
BPB_SecPerClus
]
;
ff.c:3318
check_fs()
&&
ld_word
(
fs
->
win
+
BPB_RsvdSecCnt
)
!=
0
/* Properness of reserved sectors (MNBZ) */
ff.c:3321
check_fs()
&&
(
UINT
)
fs
->
win
[
BPB_NumFATs
]
-
1
<=
1
/* Properness of FATs (1 or 2) */
ff.c:3322
check_fs()
&&
ld_word
(
fs
->
win
+
BPB_RootEntCnt
)
!=
0
/* Properness of root dir entries (MNBZ) */
ff.c:3323
check_fs()
&&
(
ld_word
(
fs
->
win
+
BPB_TotSec16
)
>=
MIN_FAT12_SEC_VOL
||
ld_dword
(
fs
->
win
+
BPB_TotSec32
)
>=
0x10000
)
/* Properness of volume sectors (>=MIN_FAT12_SEC_VOL) */
ff.c:3324
check_fs()
&&
ld_word
(
fs
->
win
+
BPB_FATSz16
)
!=
0
)
{
/* Properness of FAT size (MNBZ) */
ff.c:3325
check_fs()
mbr_pt
[
i
]
=
ld_dword
(
fs
->
win
+
MBR_Table
+
i
*
SZ_PTE
+
PTE_StLba
)
;
ff.c:3374
find_volume()
if
(
ld_word
(
fs
->
win
+
BPB_BytsPerSec
)
!=
SS
(
fs
)
)
return
FR_NO_FILESYSTEM
;
/* (BPB_BytsPerSec must be equal to the physical sector size) */
ff.c:3521
mount_volume()
fasize
=
ld_word
(
fs
->
win
+
BPB_FATSz16
)
;
/* Number of sectors per FAT */
ff.c:3523
mount_volume()
if
(
fasize
==
0
)
fasize
=
ld_dword
(
fs
->
win
+
BPB_FATSz32
)
;
ff.c:3524
mount_volume()
fs
->
n_fats
=
fs
->
win
[
BPB_NumFATs
]
;
/* Number of FATs */
ff.c:3527
mount_volume()
fs
->
csize
=
fs
->
win
[
BPB_SecPerClus
]
;
/* Cluster size */
ff.c:3531
mount_volume()
fs
->
n_rootdir
=
ld_word
(
fs
->
win
+
BPB_RootEntCnt
)
;
/* Number of root directory entries */
ff.c:3534
mount_volume()
tsect
=
ld_word
(
fs
->
win
+
BPB_TotSec16
)
;
/* Number of sectors on the volume */
ff.c:3537
mount_volume()
if
(
tsect
==
0
)
tsect
=
ld_dword
(
fs
->
win
+
BPB_TotSec32
)
;
ff.c:3538
mount_volume()
nrsv
=
ld_word
(
fs
->
win
+
BPB_RsvdSecCnt
)
;
/* Number of reserved sectors */
ff.c:3540
mount_volume()
if
(
ld_word
(
fs
->
win
+
BPB_FSVer32
)
!=
0
)
return
FR_NO_FILESYSTEM
;
/* (Must be FAT32 revision 0.0) */
ff.c:3560
mount_volume()
fs
->
dirbase
=
ld_dword
(
fs
->
win
+
BPB_RootClus32
)
;
/* Root directory start cluster */
ff.c:3562
mount_volume()
&&
ld_word
(
fs
->
win
+
BPB_FSInfo32
)
==
1
ff.c:3578
mount_volume()
if
(
ld_word
(
fs
->
win
+
BS_55AA
)
==
0xAA55
/* Load FSInfo data if available */
ff.c:3582
mount_volume()
&&
ld_dword
(
fs
->
win
+
FSI_LeadSig
)
==
0x41615252
ff.c:3583
mount_volume()
&&
ld_dword
(
fs
->
win
+
FSI_StrucSig
)
==
0x61417272
)
ff.c:3584
mount_volume()
fs
->
free_clst
=
ld_dword
(
fs
->
win
+
FSI_Free_Count
)
;
ff.c:3587
mount_volume()
fs
->
last_clst
=
ld_dword
(
fs
->
win
+
FSI_Nxt_Free
)
;
ff.c:3590
mount_volume()
if
(
ld_word
(
fs
->
win
+
i
)
==
0
)
nfree
++
;
ff.c:4925
f_getfree()
if
(
(
ld_dword
(
fs
->
win
+
i
)
&
0x0FFFFFFF
)
==
0
)
nfree
++
;
ff.c:4928
f_getfree()
memset
(
fs
->
win
+
DIR_Name
,
' '
,
11
)
;
/* Create "." entry */
ff.c:5130
f_mkdir()
fs
->
win
[
DIR_Name
]
=
'.'
;
ff.c:5131
f_mkdir()
fs
->
win
[
DIR_Attr
]
=
AM_DIR
;
ff.c:5132
f_mkdir()
st_dword
(
fs
->
win
+
DIR_ModTime
,
tm
)
;
ff.c:5133
f_mkdir()
st_clust
(
fs
,
fs
->
win
,
dcl
)
;
ff.c:5134
f_mkdir()
memcpy
(
fs
->
win
+
SZDIRE
,
fs
->
win
,
SZDIRE
)
;
/* Create ".." entry */
ff.c:5135
f_mkdir()
fs
->
win
[
SZDIRE
+
1
]
=
'.'
;
pcl
=
dj
.
obj
.
sclust
;
ff.c:5136
f_mkdir()
st_clust
(
fs
,
fs
->
win
+
SZDIRE
,
pcl
)
;
ff.c:5137
f_mkdir()
dir
=
fs
->
win
+
SZDIRE
*
1
;
/* Ptr to .. entry */
ff.c:5255
f_rename()
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
FATFS::win
is read by 15 functions:
All items filtered out
FATFS::win
sync_window()
move_window()
sync_fs()
get_fat()
put_fat()
dir_clear()
dir_sdi()
dir_next()
follow_path()
check_fs()
find_volume()
mount_volume()
f_getfree()
f_mkdir()
f_rename()
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out