mirror of https://github.com/rusefi/ChibiOS.git
Added alignment checks to the SDIO/SDMMC drivers.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9711 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
c7c6f26484
commit
5dfd79b059
|
@ -813,7 +813,9 @@ bool sdc_lld_read(SDCDriver *sdcp, uint32_t startblk,
|
|||
}
|
||||
return HAL_SUCCESS;
|
||||
}
|
||||
#endif /* STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
#else /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
osalDbgAssert((((unsigned)buf & 3) == 0), "unaligned buffer");
|
||||
#endif /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
return sdc_lld_read_aligned(sdcp, startblk, buf, blocks);
|
||||
}
|
||||
|
||||
|
@ -846,7 +848,9 @@ bool sdc_lld_write(SDCDriver *sdcp, uint32_t startblk,
|
|||
}
|
||||
return HAL_SUCCESS;
|
||||
}
|
||||
#endif /* STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
#else /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
osalDbgAssert((((unsigned)buf & 3) == 0), "unaligned buffer");
|
||||
#endif /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
return sdc_lld_write_aligned(sdcp, startblk, buf, blocks);
|
||||
}
|
||||
|
||||
|
|
|
@ -904,7 +904,9 @@ bool sdc_lld_read(SDCDriver *sdcp, uint32_t startblk,
|
|||
}
|
||||
return HAL_SUCCESS;
|
||||
}
|
||||
#endif /* STM32_SDC_SDMMC_UNALIGNED_SUPPORT */
|
||||
#else /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
osalDbgAssert((((unsigned)buf & 3) == 0), "unaligned buffer");
|
||||
#endif /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
return sdc_lld_read_aligned(sdcp, startblk, buf, blocks);
|
||||
}
|
||||
|
||||
|
@ -937,7 +939,9 @@ bool sdc_lld_write(SDCDriver *sdcp, uint32_t startblk,
|
|||
}
|
||||
return HAL_SUCCESS;
|
||||
}
|
||||
#endif /* STM32_SDC_SDMMC_UNALIGNED_SUPPORT */
|
||||
#else /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
osalDbgAssert((((unsigned)buf & 3) == 0), "unaligned buffer");
|
||||
#endif /* !STM32_SDC_SDIO_UNALIGNED_SUPPORT */
|
||||
return sdc_lld_write_aligned(sdcp, startblk, buf, blocks);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue