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
2 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue