Skip to content

Commit 82267c2

Browse files
committed
chore: RTCSecondsIrqCallback only when ONESECOND_IRQn
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 2ccc178 commit 82267c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rtc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ static void *callbackUserData = NULL;
6363
static voidCallbackPtr RTCUserCallbackB = NULL;
6464
static void *callbackUserDataB = NULL;
6565
#endif
66+
#ifdef ONESECOND_IRQn
6667
static voidCallbackPtr RTCSecondsIrqCallback = NULL;
67-
68+
#endif
6869
static sourceClock_t clkSrc = LSI_CLOCK;
6970
static uint32_t clkVal = LSI_VALUE;
7071
static uint8_t HSEDiv = 0;
@@ -645,7 +646,9 @@ void RTC_DeInit(bool reset_cb)
645646
RTCUserCallbackB = NULL;
646647
callbackUserDataB = NULL;
647648
#endif
649+
#ifdef ONESECOND_IRQn
648650
RTCSecondsIrqCallback = NULL;
651+
#endif
649652
}
650653
}
651654

0 commit comments

Comments
 (0)