File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,19 @@ void STM32RTC::begin(RTCHourFormats_t format)
9595 _configured = true ;
9696}
9797
98+ /* *
99+ * @brief Deinitialize and stop the RTC
100+ * @param None
101+ * @retval None
102+ */
103+ void STM32RTC::end (void )
104+ {
105+ if (_configured == true ) {
106+ RTC_DeInit ();
107+ _configured = false ;
108+ }
109+ }
110+
98111/* *
99112 * @brief set the RTC clock source. By default LSI clock is selected. This
100113 * method must be called before begin().
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ class STM32RTC {
9292 void begin (bool resetTime, RTCHourFormats_t format = HOUR_24);
9393 void begin (RTCHourFormats_t format = HOUR_24);
9494
95+ void end (void );
96+
9597 void setClockSource (RTC_sourceClock_t source);
9698
9799 void enableAlarm (Alarm_Match match);
You can’t perform that action at this time.
0 commit comments