From 22d92e7b7f4cb710dce6811928425ab427a5d9de Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 9 Oct 2017 07:18:18 +0300 Subject: [PATCH] Change size of fatfs ioctl returns --- libraries/SD/src/sd_diskio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/SD/src/sd_diskio.cpp b/libraries/SD/src/sd_diskio.cpp index e82cdc61..dbfadfee 100644 --- a/libraries/SD/src/sd_diskio.cpp +++ b/libraries/SD/src/sd_diskio.cpp @@ -628,10 +628,10 @@ DRESULT ff_sd_ioctl(uint8_t pdrv, uint8_t cmd, void* buff) *((unsigned long*) buff) = s_cards[pdrv]->sectors; return RES_OK; case GET_SECTOR_SIZE: - *((unsigned long*) buff) = 512; + *((WORD*) buff) = 512; return RES_OK; case GET_BLOCK_SIZE: - *((unsigned long*)buff) = 1; + *((uint32_t*)buff) = 1; return RES_OK; } return RES_PARERR;