FatFS
SS
is only used within FatFS.
Symbol previews are coming soon...
Symbols
loading...
Files
loading...
Summary
Syntax
Arguments
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
FatFS
SS
SS macro
Syntax
Show:
Summary
Declaration
from
ff.c:268
#define
SS
(
fs
)
(
(
fs
)
->
ssize
)
Arguments
Argument
fs
Examples
References
from
examples
Code
Location
#define
SS
(
fs
)
(
(
fs
)
->
ssize
)
/* Variable sector size */
ff.c:268
memset
(
fs
->
win
,
0
,
SS
(
fs
)
)
;
ff.c:1124
if
(
move_window
(
fs
,
fs
->
fatbase
+
(
bc
/
SS
(
fs
)
)
)
!=
FR_OK
)
break
;
ff.c:1185
wc
=
fs
->
win
[
bc
++
%
SS
(
fs
)
]
;
/* Get 1st byte of the entry */
ff.c:1186
if
(
move_window
(
fs
,
fs
->
fatbase
+
(
bc
/
SS
(
fs
)
)
)
!=
FR_OK
)
break
;
ff.c:1187
wc
|=
fs
->
win
[
bc
%
SS
(
fs
)
]
<
<
8
;
/* Merge 2nd byte of the entry */
ff.c:1188
if
(
move_window
(
fs
,
fs
->
fatbase
+
(
clst
/
(
SS
(
fs
)
/
2
)
)
)
!=
FR_OK
)
break
;
ff.c:1193
val
=
ld_word
(
fs
->
win
+
clst
*
2
%
SS
(
fs
)
)
;
/* Simple WORD array */
ff.c:1194
if
(
move_window
(
fs
,
fs
->
fatbase
+
(
clst
/
(
SS
(
fs
)
/
4
)
)
)
!=
FR_OK
)
break
;
ff.c:1198
val
=
ld_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
)
&
0x0FFFFFFF
;
/* Simple DWORD array but mask out upper 4 bits */
ff.c:1199
res
=
move_window
(
fs
,
fs
->
fatbase
+
(
bc
/
SS
(
fs
)
)
)
;
ff.c:1259
p
=
fs
->
win
+
bc
++
%
SS
(
fs
)
;
ff.c:1261
res
=
move_window
(
fs
,
fs
->
fatbase
+
(
bc
/
SS
(
fs
)
)
)
;
ff.c:1264
p
=
fs
->
win
+
bc
%
SS
(
fs
)
;
ff.c:1266
res
=
move_window
(
fs
,
fs
->
fatbase
+
(
clst
/
(
SS
(
fs
)
/
2
)
)
)
;
ff.c:1272
st_word
(
fs
->
win
+
clst
*
2
%
SS
(
fs
)
,
(
WORD
)
val
)
;
/* Simple WORD array */
ff.c:1274
res
=
move_window
(
fs
,
fs
->
fatbase
+
(
clst
/
(
SS
(
fs
)
/
4
)
)
)
;
ff.c:1282
val
=
(
val
&
0x0FFFFFFF
)
|
(
ld_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
)
&
0xF0000000
)
;
ff.c:1285
st_dword
(
fs
->
win
+
clst
*
4
%
SS
(
fs
)
,
val
)
;
ff.c:1287
memset
(
fs
->
win
,
0
,
SS
(
fs
)
)
;
/* Clear window buffer */
ff.c:1676
for
(
szb
=
(
(
DWORD
)
fs
->
csize
*
SS
(
fs
)
>=
MAX_MALLOC
)
?
MAX_MALLOC
:
fs
->
csize
*
SS
(
fs
)
,
ibuf
=
0
;
szb
>
SS
(
fs
)
&&
(
ibuf
=
ff_memalloc
(
szb
)
)
==
0
;
szb
/=
2
)
;
ff.c:1679
if
(
szb
>
SS
(
fs
)
)
{
/* Buffer allocated? */
ff.c:1680
szb
/=
SS
(
fs
)
;
/* Bytes -> Sectors */
ff.c:1682
csz
=
(
DWORD
)
fs
->
csize
*
SS
(
fs
)
;
/* Bytes per cluster */
ff.c:1726
dp
->
sect
+=
ofs
/
SS
(
fs
)
;
/* Sector# of the directory entry */
ff.c:1737
dp
->
dir
=
fs
->
win
+
(
ofs
%
SS
(
fs
)
)
;
/* Pointer to the entry in the win[] */
ff.c:1738
if
(
ofs
%
SS
(
fs
)
==
0
)
{
/* Sector changed? */
ff.c:1763
if
(
(
ofs
/
SS
(
fs
)
&
(
fs
->
csize
-
1
)
)
==
0
)
{
/* Cluster changed? */
ff.c:1772
dp
->
dir
=
fs
->
win
+
ofs
%
SS
(
fs
)
;
/* Pointer to the entry in the win[] */
ff.c:1798
dp
->
obj
.
sclust
=
ld_clust
(
fs
,
fs
->
win
+
dp
->
dptr
%
SS
(
fs
)
)
;
/* Open next directory */
ff.c:3128
if
(
disk_ioctl
(
fs
->
pdrv
,
GET_SECTOR_SIZE
,
&
SS
(
fs
)
)
!=
RES_OK
)
return
FR_DISK_ERR
;
ff.c:3441
if
(
SS
(
fs
)
>
FF_MAX_SS
||
SS
(
fs
)
<
FF_MIN_SS
||
(
SS
(
fs
)
&
(
SS
(
fs
)
-
1
)
)
)
return
FR_DISK_ERR
;
ff.c:3442
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
if
(
fs
->
n_rootdir
%
(
SS
(
fs
)
/
SZDIRE
)
)
return
FR_NO_FILESYSTEM
;
/* (Must be sector aligned) */
ff.c:3535
sysect
=
nrsv
+
fasize
+
fs
->
n_rootdir
/
(
SS
(
fs
)
/
SZDIRE
)
;
/* RSV + FAT + FF_DIR */
ff.c:3544
if
(
fs
->
fsize
<
(
szbfat
+
(
SS
(
fs
)
-
1
)
)
/
SS
(
fs
)
)
return
FR_NO_FILESYSTEM
;
/* (BPB_FATSz must not be less than the size needed) */
ff.c:3570
memset
(
fp
->
buf
,
0
,
SS
(
fs
)
)
;
/* Clear sector buffer */
ff.c:3893
bcs
=
(
DWORD
)
fs
->
csize
*
SS
(
fs
)
;
/* Cluster size in byte */
ff.c:3898
if
(
res
==
FR_OK
&&
ofs
%
SS
(
fs
)
)
{
/* Fill sector buffer if not on the sector boundary */
ff.c:3906
fp
->
sect
=
sc
+
(
DWORD
)
(
ofs
/
SS
(
fs
)
)
;
ff.c:3911
if
(
fp
->
fptr
%
SS
(
fs
)
==
0
)
{
/* On the sector boundary? */
ff.c:3975
csect
=
(
UINT
)
(
fp
->
fptr
/
SS
(
fs
)
&
(
fs
->
csize
-
1
)
)
;
/* Sector offset in the cluster */
ff.c:3976
cc
=
btr
/
SS
(
fs
)
;
/* When remaining bytes >= sector size, */
ff.c:3997
memcpy
(
rbuff
+
(
(
fp
->
sect
-
sect
)
*
SS
(
fs
)
)
,
fp
->
buf
,
SS
(
fs
)
)
;
ff.c:4010
rcnt
=
SS
(
fs
)
*
cc
;
/* Number of bytes transferred */
ff.c:4014
rcnt
=
SS
(
fs
)
-
(
UINT
)
fp
->
fptr
%
SS
(
fs
)
;
/* Number of bytes remains in the sector */
ff.c:4030
memcpy
(
rbuff
,
fp
->
buf
+
fp
->
fptr
%
SS
(
fs
)
,
rcnt
)
;
/* Extract partial sector */
ff.c:4036
if
(
fp
->
fptr
%
SS
(
fs
)
==
0
)
{
/* On the sector boundary? */
ff.c:4077
csect
=
(
UINT
)
(
fp
->
fptr
/
SS
(
fs
)
)
&
(
fs
->
csize
-
1
)
;
/* Sector offset in the cluster */
ff.c:4078
cc
=
btw
/
SS
(
fs
)
;
/* When remaining bytes >= sector size, */
ff.c:4112
memcpy
(
fp
->
buf
,
wbuff
+
(
(
fp
->
sect
-
sect
)
*
SS
(
fs
)
)
,
SS
(
fs
)
)
;
ff.c:4126
wcnt
=
SS
(
fs
)
*
cc
;
/* Number of bytes transferred */
ff.c:4131
wcnt
=
SS
(
fs
)
-
(
UINT
)
fp
->
fptr
%
SS
(
fs
)
;
/* Number of bytes remains in the sector */
ff.c:4148
memcpy
(
fp
->
buf
+
fp
->
fptr
%
SS
(
fs
)
,
wbuff
,
wcnt
)
;
/* Fit data to the sector */
ff.c:4155
bcs
=
(
DWORD
)
fs
->
csize
*
SS
(
fs
)
;
/* Cluster size (byte) */
ff.c:4562
if
(
ofs
%
SS
(
fs
)
)
{
ff.c:4603
nsect
+=
(
DWORD
)
(
ofs
/
SS
(
fs
)
)
;
ff.c:4606
if
(
fp
->
fptr
%
SS
(
fs
)
&&
nsect
!=
fp
->
sect
)
{
/* Fill sector cache if needed */
ff.c:4614
i
%=
SS
(
fs
)
;
ff.c:4931
n
=
(
DWORD
)
fs
->
csize
*
SS
(
fs
)
;
/* Cluster size */
ff.c:5623
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
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