Kaynağa Gözat

[bsp][infineon] fix the type of rtc_alarm_callback in drv_rtc #10830

ljcjames 2 ay önce
ebeveyn
işleme
f0659d79a7
1 değiştirilmiş dosya ile 7 ekleme ve 2 silme
  1. 7 2
      bsp/Infineon/libraries/HAL_Drivers/drv_rtc.c

+ 7 - 2
bsp/Infineon/libraries/HAL_Drivers/drv_rtc.c

@@ -100,7 +100,9 @@ static rt_err_t ifx_rtc_get_timeval(struct timeval *tv)
 
     return RT_EOK;
 }
-
+#ifdef RT_USING_ALARM
+void rtc_alarm_callback(void *callback_arg, cyhal_rtc_event_t event);
+#endif
 static rt_err_t _rtc_init(void)
 {
 #ifdef BSP_RTC_USING_LSE
@@ -187,8 +189,10 @@ static rt_err_t _rtc_set_alarm(struct rt_rtc_wkalarm *alarm)
 }
 
 #ifdef RT_USING_ALARM
-void rtc_alarm_callback(void)
+void rtc_alarm_callback(void *callback_arg, cyhal_rtc_event_t event)
 {
+    RT_UNUSED(callback_arg);
+    RT_UNUSED(event);
     rt_interrupt_enter();
     rt_alarm_update(0, 0);
     rt_interrupt_leave();
@@ -232,3 +236,4 @@ static int rt_hw_rtc_init(void)
 
 INIT_DEVICE_EXPORT(rt_hw_rtc_init);
 #endif
+#endif