Skip to content

Commit 9e337bb

Browse files
author
Oren Cohen
committed
Restore disk_get_sector_size() to return WORD
1 parent 37b5442 commit 9e337bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

features/storage/filesystem/fat/FATFileSystem.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ void ff_memfree(void *p)
166166
}
167167

168168
// Implementation of diskio functions (see ChaN/diskio.h)
169-
static DWORD disk_get_sector_size(BYTE pdrv)
169+
static WORD disk_get_sector_size(BYTE pdrv)
170170
{
171171
bd_size_t sector_size = _ffs[pdrv]->get_erase_size();
172-
MBED_ASSERT(sector_size <= DWORD(-1));
172+
MBED_ASSERT(sector_size <= WORD(-1));
173173

174-
DWORD ssize = sector_size;
174+
WORD ssize = sector_size;
175175
if (ssize < 512) {
176176
ssize = 512;
177177
}
@@ -251,7 +251,7 @@ DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
251251
if (_ffs[pdrv] == NULL) {
252252
return RES_NOTRDY;
253253
} else {
254-
*((DWORD*)buff) = disk_get_sector_size(pdrv);
254+
*((WORD*)buff) = disk_get_sector_size(pdrv);
255255
return RES_OK;
256256
}
257257
case GET_BLOCK_SIZE:

0 commit comments

Comments
 (0)