Skip to content

Commit c2bd704

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). Note: same for STM32LowPower Signed-off-by: Frederic Pillon <[email protected]>
1 parent bfe6843 commit c2bd704

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/STM32RTC.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
#define __STM32_RTC_H
3939

4040
#include "Arduino.h"
41-
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000)
42-
#include "rtc.h"
41+
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION < 0x02000000)
42+
#error "This library is not compatible with core version used. Please update the core."
4343
#endif
44+
#include "rtc.h"
4445
// Check if RTC HAL enable in variants/board_name/stm32yzxx_hal_conf.h
4546
#ifndef HAL_RTC_MODULE_ENABLED
4647
#error "RTC configuration is missing. Check flag HAL_RTC_MODULE_ENABLED in variants/board_name/stm32yzxx_hal_conf.h"

0 commit comments

Comments
 (0)