diff options
| author | sakumisu <[email protected]> | 2025-06-05 12:40:54 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-06-05 12:40:54 +0800 |
| commit | 5f9d06a9f5ce6ce0a96111224fa19455c3fa3acb (patch) | |
| tree | 5004e220029f53fa4765b1f4d3fe9c6a5a19a4b1 | |
| parent | 537ccfd945382491b97b75ca380949b8cbff39cd (diff) | |
update(platform/fatfs): change memalign to aligned_alloc
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | platform/fatfs/usbh_fatfs.c | 4 |
1 files 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; |
