Skip to content

Commit

Permalink
chore: update check on STM32_CORE_VERSION
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fpistm committed Jan 19, 2023
1 parent ad158d3 commit b89e555
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/STM32RTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,7 @@ class STM32RTC {
bool isAlarmEnabled(Alarm name = ALARM_A);
bool isTimeSet(void)
{
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01050000)
return _timeSet;
#else
return false;
#endif
}

friend class STM32LowPower;
Expand Down
3 changes: 1 addition & 2 deletions src/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
#include "stm32yyxx_ll_rtc.h"
#include <string.h>

#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&\
defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
#if defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
#if defined(STM32MP1xx)
/**
* Currently there is no RTC driver for STM32MP1xx. If RTC is used in the future
Expand Down
3 changes: 1 addition & 2 deletions src/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
#include "backup.h"
#include "clock.h"

#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) &&\
defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)
#if defined(HAL_RTC_MODULE_ENABLED) && !defined(HAL_RTC_MODULE_ONLY)

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit b89e555

Please sign in to comment.