From 5f9d06a9f5ce6ce0a96111224fa19455c3fa3acb Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Thu, 5 Jun 2025 12:40:54 +0800 Subject: update(platform/fatfs): change memalign to aligned_alloc Signed-off-by: sakumisu <1203593632@qq.com> --- platform/fatfs/usbh_fatfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/fatfs/usbh_fatfs.c b/platform/fatfs/usbh_fatfs.c index ad1b04ca..1d7aff38 100644 --- a/platform/fatfs/usbh_fatfs.c +++ b/platform/fatfs/usbh_fatfs.c @@ -36,7 +36,7 @@ int USB_disk_read(BYTE *buff, LBA_t sector, UINT count) align_buf = (uint8_t *)buff; #ifdef CONFIG_USB_DCACHE_ENABLE if ((uint32_t)buff & (CONFIG_USB_ALIGN_SIZE - 1)) { - align_buf = (uint8_t *)memalign(CONFIG_USB_ALIGN_SIZE, count * active_msc_class->blocksize); + align_buf = (uint8_t *)aligned_alloc(CONFIG_USB_ALIGN_SIZE, count * active_msc_class->blocksize); if (!align_buf) { printf("msc get align buf failed\r\n"); return -USB_ERR_NOMEM; @@ -66,7 +66,7 @@ int USB_disk_write(const BYTE *buff, LBA_t sector, UINT count) align_buf = (uint8_t *)buff; #ifdef CONFIG_USB_DCACHE_ENABLE if ((uint32_t)buff & (CONFIG_USB_ALIGN_SIZE - 1)) { - align_buf = (uint8_t *)memalign(CONFIG_USB_ALIGN_SIZE, count * active_msc_class->blocksize); + align_buf = (uint8_t *)aligned_alloc(CONFIG_USB_ALIGN_SIZE, count * active_msc_class->blocksize); if (!align_buf) { printf("msc get align buf failed\r\n"); return -USB_ERR_NOMEM; -- cgit v1.3.1