From e625d710795516c0ae1bff38ba3a5afd3e14cc05 Mon Sep 17 00:00:00 2001 From: doudou <1491766334@qq.com> Date: Tue, 30 Jan 2024 14:39:39 +0800 Subject: [PATCH] =?UTF-8?q?update:fatfs=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/fatfs/diskio_spitf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/components/fatfs/diskio_spitf.c b/components/fatfs/diskio_spitf.c index 8f8776dd1..83d9dbe1a 100644 --- a/components/fatfs/diskio_spitf.c +++ b/components/fatfs/diskio_spitf.c @@ -977,9 +977,10 @@ const block_disk_opts_t spitf_disk_opts = { .write = luat_spitf_write, .ioctl = luat_spitf_ioctl, }; -#ifndef LUAT_COMPILER_NOWEAK -__attribute__((weak)) void luat_spi_set_sdhc_ctrl( - block_disk_t *disk) + +void luat_spi_set_sdhc_ctrl_default( + block_disk_t *disk +) { luat_fatfs_spi_t* userdata = disk->userdata; if (userdata->type) @@ -1002,6 +1003,13 @@ __attribute__((weak)) void luat_spi_set_sdhc_ctrl( disk->userdata = NULL; disk->opts = &spitf_disk_opts; } + +#ifndef LUAT_COMPILER_NOWEAK +__attribute__((weak)) void luat_spi_set_sdhc_ctrl( + block_disk_t *disk) +{ + luat_spi_set_sdhc_ctrl_default(disk); +} #else void luat_spi_set_sdhc_ctrl(block_disk_t *disk); #endif