Skip to content

Commit

Permalink
fix rtc alarm thread parameters issue
Browse files Browse the repository at this point in the history
  • Loading branch information
milo-9 authored and mysterywolf committed Sep 30, 2024
1 parent 66d54ea commit bad2745
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions components/drivers/rtc/dev_alarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit bad2745

Please sign in to comment.