From f7405503703fcd4874673fbfde0ba88a331bcd19 Mon Sep 17 00:00:00 2001 From: sc <2401809606@qq.com> Date: Sat, 13 Dec 2025 16:45:05 +0800 Subject: [PATCH] =?UTF-8?q?1307=E6=B3=A8=E5=86=8C=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- drivers/drv_ds1307.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/drv_ds1307.c b/drivers/drv_ds1307.c index 0bbfcd6..fa9f769 100644 --- a/drivers/drv_ds1307.c +++ b/drivers/drv_ds1307.c @@ -27,7 +27,7 @@ #include #include #include - +#include #define DBG_TAG "DS1307" #ifdef BRD_RTC_DS1307_DEBUG @@ -215,7 +215,7 @@ static rt_err_t ds1307_write_tm(struct tm *tm) return err; } -/* RTC ops */ +/* RTC ops *//* static rt_err_t ds1307_rtc_init(void) { return RT_EOK; @@ -272,9 +272,9 @@ static const struct rt_rtc_ops ds1307_rtc_ops = RT_NULL, ds1307_rtc_get_timeval, ds1307_rtc_set_timeval, -}; +};*/ -static rt_rtc_dev_t ds1307_rtc_dev; +//static rt_rtc_dev_t ds1307_rtc_dev; /* Initialization and registration */ static int rt_hw_ds1307_rtc_init(void) @@ -297,12 +297,12 @@ static int rt_hw_ds1307_rtc_init(void) rt_thread_startup(ds1307.thd_soft_update_sec); } - rt_err_t result = rt_hw_rtc_register(&ds1307_rtc_dev, "ds1307", RT_DEVICE_FLAG_RDWR, &ds1307); + /* rt_err_t result = rt_hw_rtc_register(&ds1307_rtc_dev, "ds1307", RT_DEVICE_FLAG_RDWR, &ds1307); if (result != RT_EOK) { LOG_E("RTC register failed: %d", result); return result; - } + }*/ LOG_I("DS1307 RTC initialized successfully on %s", ds1307.iic_name); return RT_EOK; @@ -359,4 +359,4 @@ void date_drv(void) } MSH_CMD_EXPORT(date_drv, Read DS1307 RTC time); - /* BRD_RTC_DS1307 */ +/* BRD_RTC_DS1307 */