mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-16 11:38:11 +08:00
bsp: cvitek: fix warning on rtc driver
When RTC is enabled, a warning appear during compiling:
warning: implicit declaration of function 'rtc_alarm_enable' [-Wimplicit-function-declaration]
366 | rtc_alarm_enable(alarm->enable);
| ^~~~~~~~~~~~~~~~
It's due to _rtc_set_alarm is not covered by RT_USING_ALARM. It's wrong.
Solution: cover all functions including _rtc_get_alarm & _rtc_set_alarm
under RT_USING_ALARM macro conditional defintion.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
@@ -317,7 +317,6 @@ static void rt_hw_rtc_isr(int irqno, void *param)
|
||||
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
|
||||
static rt_err_t _rtc_get_alarm(struct rt_rtc_wkalarm *alarm)
|
||||
{
|
||||
@@ -367,6 +366,7 @@ static rt_err_t _rtc_set_alarm(struct rt_rtc_wkalarm *alarm)
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct rt_rtc_ops _rtc_ops =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user