Skip to content

Commit b89e555

Browse files
committed
chore: update check on STM32_CORE_VERSION
since rtc bsp was moved to the library, STM32RTC API's are no more compatible with the one provided within old core version (<2.0.0). Signed-off-by: Frederic Pillon <[email protected]>
1 parent ad158d3 commit b89e555

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/STM32RTC.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,7 @@ class STM32RTC {
226226
bool isAlarmEnabled(Alarm name = ALARM_A);
227227
bool isTimeSet(void)
228228
{
229-
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01050000)
230229
return _timeSet;
231-
#else
232-
return false;
233-
#endif
234230
}
235231

236232
friend class STM32LowPower;

src/rtc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
#include "stm32yyxx_ll_rtc.h"
3939
#include <string.h>
4040

41-
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&\
42-
defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
41+
#if defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
4342
#if defined(STM32MP1xx)
4443
/**
4544
* Currently there is no RTC driver for STM32MP1xx. If RTC is used in the future

src/rtc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
#include "backup.h"
4444
#include "clock.h"
4545

46-
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&\
47-
defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
46+
#if defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
4847

4948
#ifdef __cplusplus
5049
extern "C" {

0 commit comments

Comments
 (0)