From 9e47b95e61b09ddbec2bc9f8a2c2cbb970b1f54e Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Fri, 30 Jul 2021 02:31:15 +0800 Subject: [PATCH] rt_rtc_dev_register -> rt_hw_rtc_register --- bsp/stm32/libraries/HAL_Drivers/drv_rtc.c | 2 +- components/drivers/include/drivers/rtc_core.h | 2 +- components/drivers/rtc/rtc_core.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c b/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c index 15968a178c..fb0680dfb2 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c @@ -280,7 +280,7 @@ static int rt_hw_rtc_init(void) rt_err_t result; stm32_rtc_dev.ops = &stm32_rtc_ops; - result = rt_rtc_dev_register(&stm32_rtc_dev, "rtc", RT_DEVICE_FLAG_RDWR, RT_NULL); + result = rt_hw_rtc_register(&stm32_rtc_dev, "rtc", RT_DEVICE_FLAG_RDWR, RT_NULL); if (result != RT_EOK) { LOG_E("rtc register err code: %d", result); diff --git a/components/drivers/include/drivers/rtc_core.h b/components/drivers/include/drivers/rtc_core.h index f0c7b64e94..e858e9ee28 100644 --- a/components/drivers/include/drivers/rtc_core.h +++ b/components/drivers/include/drivers/rtc_core.h @@ -37,7 +37,7 @@ typedef struct rt_rtc_device const struct rt_rtc_ops *ops; } rt_rtc_dev_t; -rt_err_t rt_rtc_dev_register(rt_rtc_dev_t *rtc, +rt_err_t rt_hw_rtc_register(rt_rtc_dev_t *rtc, const char *name, rt_uint32_t flag, void *data); diff --git a/components/drivers/rtc/rtc_core.c b/components/drivers/rtc/rtc_core.c index 80bb61c8aa..8edec43095 100644 --- a/components/drivers/rtc/rtc_core.c +++ b/components/drivers/rtc/rtc_core.c @@ -91,7 +91,7 @@ const static struct rt_device_ops rtc_core_ops = }; #endif -rt_err_t rt_rtc_dev_register(rt_rtc_dev_t *rtc, +rt_err_t rt_hw_rtc_register(rt_rtc_dev_t *rtc, const char *name, rt_uint32_t flag, void *data) -- GitLab