aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c')
-rw-r--r--os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c b/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c
index 73e8483e0..8982d45b4 100644
--- a/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c
+++ b/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.c
@@ -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);
}