From a38607fcbc3767357b9bc513b129e9a26aabdca9 Mon Sep 17 00:00:00 2001 From: Dozingfiretruck <1473454180@qq.com> Date: Fri, 3 Sep 2021 12:14:13 +0800 Subject: [PATCH] =?UTF-8?q?add:rtc=E5=91=BD=E5=90=8D=E8=A7=84=E8=8C=83,?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=90=AF=E7=94=A8DFS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/at32/Libraries/rt_drivers/drv_rtc.c | 16 ++++++++-------- bsp/at32/at32f403a-start/board/Kconfig | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bsp/at32/Libraries/rt_drivers/drv_rtc.c b/bsp/at32/Libraries/rt_drivers/drv_rtc.c index 9eba173741..0a6808802d 100644 --- a/bsp/at32/Libraries/rt_drivers/drv_rtc.c +++ b/bsp/at32/Libraries/rt_drivers/drv_rtc.c @@ -148,7 +148,7 @@ static rt_err_t rt_rtc_config(void) return RT_EOK; } -static rt_err_t at32_rtc_init(void) +static rt_err_t _rtc_init(void) { #if defined (SOC_SERIES_AT32F415) RCC_APB1PeriphClockCmd(RCC_APB1PERIPH_PWR, ENABLE); @@ -173,7 +173,7 @@ static rt_err_t at32_rtc_init(void) return RT_EOK; } -static rt_err_t at32_rtc_get_secs(void *args) +static rt_err_t _rtc_get_secs(void *args) { *(rt_uint32_t *)args = get_rtc_timestamp(); LOG_D("RTC: get rtc_time %x\n", *(rt_uint32_t *)args); @@ -181,7 +181,7 @@ static rt_err_t at32_rtc_get_secs(void *args) return RT_EOK; } -static rt_err_t at32_rtc_set_secs(void *args) +static rt_err_t _rtc_set_secs(void *args) { rt_err_t result = RT_EOK; @@ -194,11 +194,11 @@ static rt_err_t at32_rtc_set_secs(void *args) return result; } -static const struct rt_rtc_ops at32_rtc_ops = +static const struct rt_rtc_ops _rtc_ops = { - at32_rtc_init, - at32_rtc_get_secs, - at32_rtc_set_secs, + _rtc_init, + _rtc_get_secs, + _rtc_set_secs, RT_NULL, RT_NULL, RT_NULL, @@ -210,7 +210,7 @@ static rt_rtc_dev_t at32_rtc_dev; int rt_hw_rtc_init(void) { rt_err_t result; - at32_rtc_dev.ops = &at32_rtc_ops; + at32_rtc_dev.ops = &_rtc_ops; result = rt_hw_rtc_register(&at32_rtc_dev, "rtc", RT_DEVICE_FLAG_RDWR,RT_NULL); if (result != RT_EOK) { diff --git a/bsp/at32/at32f403a-start/board/Kconfig b/bsp/at32/at32f403a-start/board/Kconfig index f434d04b7c..9816ab4729 100644 --- a/bsp/at32/at32f403a-start/board/Kconfig +++ b/bsp/at32/at32f403a-start/board/Kconfig @@ -172,7 +172,6 @@ menu "On-chip Peripheral Drivers" bool "Enable SDIO" default n select RT_USING_SDIO - select RT_USING_DFS if BSP_USING_SDIO config BSP_USING_SDIO1 bool "Enable SDIO1"