summaryrefslogtreecommitdiff
path: root/components/drivers/rtc
diff options
context:
space:
mode:
authormilo <[email protected]>2024-09-30 08:38:52 +0800
committerMeco Man <[email protected]>2024-09-29 20:49:35 -0400
commitbad2745dd312cf343a4abf78ffc7fa22f2bca656 (patch)
tree43c07a478f3e088df1e03854af1c969e813243bb /components/drivers/rtc
parent66d54ea8c0f6eae5713985a7fffd099ef3eea621 (diff)
fix rtc alarm thread parameters issue
Diffstat (limited to 'components/drivers/rtc')
-rw-r--r--components/drivers/rtc/Kconfig4
-rw-r--r--components/drivers/rtc/dev_alarm.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/components/drivers/rtc/Kconfig b/components/drivers/rtc/Kconfig
index 7ae99599af..a8b33662a5 100644
--- a/components/drivers/rtc/Kconfig
+++ b/components/drivers/rtc/Kconfig
@@ -14,11 +14,11 @@ config RT_USING_RTC
config RT_ALARM_TIMESLICE
int "timeslice for alarm thread"
- default 10
+ default 5
config RT_ALARM_PRIORITY
int "priority for alarm thread"
- default 5
+ default 10
endif
config RT_USING_SOFT_RTC
diff --git a/components/drivers/rtc/dev_alarm.c b/components/drivers/rtc/dev_alarm.c
index 6a303dd6e5..e17f34462c 100644
--- a/components/drivers/rtc/dev_alarm.c
+++ b/components/drivers/rtc/dev_alarm.c
@@ -28,10 +28,10 @@
#define RT_ALARM_STACK_SIZE 2048
#endif
#ifndef RT_ALARM_TIMESLICE
-#define RT_ALARM_TIMESLICE 10
+#define RT_ALARM_TIMESLICE 5
#endif
#ifndef RT_ALARM_PRIORITY
-#define RT_ALARM_PRIORITY 5
+#define RT_ALARM_PRIORITY 10
#endif
static struct rt_alarm_container _container;
@@ -800,8 +800,8 @@ int rt_alarm_system_init(void)
tid = rt_thread_create("alarmsvc",
rt_alarmsvc_thread_init, RT_NULL,
RT_ALARM_STACK_SIZE,
- RT_ALARM_TIMESLICE,
- RT_ALARM_PRIORITY);
+ RT_ALARM_PRIORITY,
+ RT_ALARM_TIMESLICE);
if (tid != RT_NULL)
rt_thread_startup(tid);