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:
parent
0c910e755d
commit
16475b3c92
|
@ -317,7 +317,6 @@ static void rt_hw_rtc_isr(int irqno, void *param)
|
||||||
|
|
||||||
rt_interrupt_leave();
|
rt_interrupt_leave();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static rt_err_t _rtc_get_alarm(struct rt_rtc_wkalarm *alarm)
|
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;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct rt_rtc_ops _rtc_ops =
|
static const struct rt_rtc_ops _rtc_ops =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue