Skip to content

Commit bf74a2c

Browse files
committed
Move the STM32 RTC driver from core to library
To avoid further dependency issue with the core. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 3589270 commit bf74a2c

File tree

4 files changed

+891
-9
lines changed

4 files changed

+891
-9
lines changed

src/STM32RTC.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
******************************************************************************
33
* @file STM32RTC.cpp
4-
* @author WI6LABS
5-
* @version V1.0.0
6-
* @date 12-December-2017
4+
* @author Frederic Pillon
75
* @brief Provides a RTC interface for Arduino
86
*
97
******************************************************************************
108
* @attention
119
*
12-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
1311
*
1412
* Redistribution and use in source and binary forms, with or without modification,
1513
* are permitted provided that the following conditions are met:

src/STM32RTC.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
******************************************************************************
33
* @file STM32RTC.h
4-
* @author WI6LABS
5-
* @version V1.0.0
6-
* @date 12-December-2017
4+
* @author Frederic Pillon
75
* @brief Provides a RTC interface for Arduino
86
*
97
******************************************************************************
108
* @attention
119
*
12-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
1311
*
1412
* Redistribution and use in source and binary forms, with or without modification,
1513
* are permitted provided that the following conditions are met:
@@ -40,7 +38,9 @@
4038
#define __STM32_RTC_H
4139

4240
#include "Arduino.h"
43-
41+
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000)
42+
#include "rtc.h"
43+
#endif
4444
// Check if RTC HAL enable in variants/board_name/stm32yzxx_hal_conf.h
4545
#ifndef HAL_RTC_MODULE_ENABLED
4646
#error "RTC configuration is missing. Check flag HAL_RTC_MODULE_ENABLED in variants/board_name/stm32yzxx_hal_conf.h"

0 commit comments

Comments
 (0)