mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fatfs: use correct return types in ioctl calls
GET_SECTOR_SIZE should return WORD (unsigned short) but returned uint32_t. Reference: http://elm-chan.org/fsw/ff/doc/dioctl.html Closes https://github.com/espressif/esp-idf/pull/1031.
This commit is contained in:
parent
139b0c8396
commit
104204ce56
@ -64,10 +64,10 @@ DRESULT ff_sdmmc_ioctl (BYTE pdrv, BYTE cmd, void* buff)
|
||||
case CTRL_SYNC:
|
||||
return RES_OK;
|
||||
case GET_SECTOR_COUNT:
|
||||
*((uint32_t*) buff) = card->csd.capacity;
|
||||
*((DWORD*) buff) = card->csd.capacity;
|
||||
return RES_OK;
|
||||
case GET_SECTOR_SIZE:
|
||||
*((uint32_t*) buff) = card->csd.sector_size;
|
||||
*((WORD*) buff) = card->csd.sector_size;
|
||||
return RES_OK;
|
||||
case GET_BLOCK_SIZE:
|
||||
return RES_ERROR;
|
||||
|
@ -77,10 +77,10 @@ DRESULT ff_wl_ioctl (BYTE pdrv, BYTE cmd, void *buff)
|
||||
case CTRL_SYNC:
|
||||
return RES_OK;
|
||||
case GET_SECTOR_COUNT:
|
||||
*((uint32_t *) buff) = wl_size(wl_handle) / wl_sector_size(wl_handle);
|
||||
*((DWORD *) buff) = wl_size(wl_handle) / wl_sector_size(wl_handle);
|
||||
return RES_OK;
|
||||
case GET_SECTOR_SIZE:
|
||||
*((uint32_t *) buff) = wl_sector_size(wl_handle);
|
||||
*((WORD *) buff) = wl_sector_size(wl_handle);
|
||||
return RES_OK;
|
||||
case GET_BLOCK_SIZE:
|
||||
return RES_ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user