From f358a17211545357442b1951d0489210f76b04da Mon Sep 17 00:00:00 2001 From: james <1943357252@qq.com> Date: Thu, 1 Aug 2024 11:11:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5soft=20rtc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config | 4 +++- dayandnight/myproject.c | 2 +- rtconfig.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.config b/.config index e176000..2781a7f 100644 --- a/.config +++ b/.config @@ -209,7 +209,9 @@ CONFIG_RT_USING_PWM=y # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set -# CONFIG_RT_USING_RTC is not set +CONFIG_RT_USING_RTC=y +# CONFIG_RT_USING_ALARM is not set +CONFIG_RT_USING_SOFT_RTC=y CONFIG_RT_USING_SDIO=y CONFIG_RT_SDIO_STACK_SIZE=512 CONFIG_RT_SDIO_THREAD_PRIORITY=15 diff --git a/dayandnight/myproject.c b/dayandnight/myproject.c index 83c7113..7c767df 100644 --- a/dayandnight/myproject.c +++ b/dayandnight/myproject.c @@ -159,7 +159,7 @@ void test_lcd() while(1) { tmp_payload(); - rt_thread_mdelay(1000); + rt_thread_mdelay(100); } } MSH_CMD_EXPORT(test_lcd, run my project); diff --git a/rtconfig.h b/rtconfig.h index 20f569f..f748c13 100644 --- a/rtconfig.h +++ b/rtconfig.h @@ -131,6 +131,8 @@ #define RT_USING_I2C #define RT_USING_I2C_BITOPS #define RT_USING_PWM +#define RT_USING_RTC +#define RT_USING_SOFT_RTC #define RT_USING_SDIO #define RT_SDIO_STACK_SIZE 512 #define RT_SDIO_THREAD_PRIORITY 15