Skip to content

Commit 47631ef

Browse files
committed
chore: include time.h within STM32RTC.h
Signed-off-by: Frederic Pillon <[email protected]>
1 parent d7ea564 commit 47631ef

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

examples/Epoch/Epoch.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515

1616
#include <STM32RTC.h>
17-
#include <time.h>
1817

1918
/* Get the rtc object */
2019
STM32RTC& rtc = STM32RTC::getInstance();
@@ -63,4 +62,4 @@ void print2digits(uint32_t number) {
6362
Serial.print("0");
6463
}
6564
Serial.print(number);
66-
}
65+
}

src/STM32RTC.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
*
3434
******************************************************************************
3535
*/
36-
37-
#include <time.h>
38-
3936
#include "STM32RTC.h"
4037

4138
#define EPOCH_TIME_OFF 946684800 // This is 1st January 2000, 00:00:00 in epoch time

src/STM32RTC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#ifndef HAL_RTC_MODULE_ENABLED
4747
#error "RTC configuration is missing. Check flag HAL_RTC_MODULE_ENABLED in variants/board_name/stm32yzxx_hal_conf.h"
4848
#endif
49+
#include <time.h>
4950

5051
/**
5152
* @brief STM32 RTC library version number

0 commit comments

Comments
 (0)