mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-06 21:08:50 +00:00
[fix][bsp_common/fatfs] fix pointer assigning type in disk_ioctl function when cmd equal GET_SECTOR_SIZE or GET_BLOCK_SIZE
This commit is contained in:
parent
e27aedace2
commit
1ffe3b83a8
2 changed files with 4 additions and 4 deletions
|
@ -53,12 +53,12 @@ int sd_disk_ioctl(BYTE cmd, void *buff)
|
|||
break;
|
||||
|
||||
case GET_SECTOR_SIZE:
|
||||
*(DWORD *)buff = SD_CardInfo.CardBlockSize;
|
||||
*(WORD *)buff = SD_CardInfo.CardBlockSize;
|
||||
result = RES_OK;
|
||||
break;
|
||||
|
||||
case GET_BLOCK_SIZE:
|
||||
*(WORD *)buff = SD_CardInfo.CardBlockSize;
|
||||
*(DWORD *)buff = SD_CardInfo.CardBlockSize;
|
||||
result = RES_OK;
|
||||
break;
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@ int usb_disk_ioctl(BYTE cmd, void *buff)
|
|||
break;
|
||||
|
||||
case GET_SECTOR_SIZE:
|
||||
*(DWORD *)buff = FLASH_BLOCK_SIZE;
|
||||
*(WORD *)buff = FLASH_BLOCK_SIZE;
|
||||
result = RES_OK;
|
||||
break;
|
||||
|
||||
case GET_BLOCK_SIZE:
|
||||
*(WORD *)buff = 1;
|
||||
*(DWORD *)buff = 1;
|
||||
result = RES_OK;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue