Add RT_USING_RTC conditional compilation protection in ctimer.c

Analysis: There is still an omission in the preprocessing control of
_control_rtc in 24b0a81 ("Add RT_USING_RTC conditional
compilation protection in ctimer.c")

Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc

Signed-off-by: Shicheng Chu <1468559561@qq.com>
This commit is contained in:
Z8MAN8 2024-08-12 09:52:12 +08:00 committed by Rbb666
parent c468d1227c
commit 1d646bcf56
1 changed files with 2 additions and 0 deletions

View File

@ -1199,11 +1199,13 @@ int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
switch (timer->clockid)
{
#ifdef RT_USING_RTC
case CLOCK_REALTIME:
case CLOCK_REALTIME_ALARM:
if (flags & TIMER_ABSTIME)
err = _control_rtc(RT_DEVICE_CTRL_RTC_GET_TIMESPEC, &ts);
break;
#endif /* RT_USING_RTC */
case CLOCK_MONOTONIC:
case CLOCK_BOOTTIME:
case CLOCK_BOOTTIME_ALARM: